Click to See Complete Forum and Search --> : [RESOLVED] Dialog Based application icon


hypheni
October 31st, 2009, 01:55 AM
How do I set the taskbar scrolling icon for a Dialog based application window. I need to set the icon which is displayed while user press ALT+TAB to switch between multiple open window. Usually it's done by

wc.hIconSm= LoadIcon (...)

while registering window class.. but how to achieve the same for dialog based application. I'm able to set title bar and exe icons by

SendMessage(hMain, WM_SETICON, (WPARAM)ICON_SMALL, (LPARAM)hIcon);
but what should I do for that icon ??

Arjay
October 31st, 2009, 02:23 AM
Are you using MFC?

hypheni
October 31st, 2009, 02:32 AM
No.. win32 api..

Arjay
October 31st, 2009, 02:38 AM
Okay, in the future, can you post Win32 questions in the C++ and WinAPI (http://www.codeguru.com/forum/forumdisplay.php?f=47) forum? The Visual C++ forum is for VC questions related to MFC, WTL and ATL.

hypheni
October 31st, 2009, 03:14 AM
See.. I can.. but in the VC++ forum we are getting replies more faster...

Arjay
October 31st, 2009, 03:24 AM
You'll save me the trouble of moving it, if you post it in the correct forum. Thanks.

ovidiucucu
October 31st, 2009, 08:33 AM
See.. I can.. but in the VC++ forum we are getting replies more faster...
Nope, this is not true. Just more posts in VC++ forum make the VC++ forum queue longer.

Please, as much as possible, put your question(s) in the most appropriate forum and not in the "most rated" one.

hypheni
October 31st, 2009, 08:42 AM
okaay.. now can anyone tell me the solution...

hypheni
October 31st, 2009, 12:52 PM
56 Views but no new posts.. thats why I do not like to post in this forum..

@modarators
If I post non MFC topics in VC++ forum and people used to give some useful replies on that what is the wrong in that. Please do not move any post here. Its a request.

Arjay
October 31st, 2009, 02:50 PM
Please do not move any post here. Its a request.It doesn't work that way. Please post in the proper forum as we've politely asked you to. If you are a bit patient then someone will answer in this forum.

Arjay
October 31st, 2009, 03:08 PM
I looked around the internet and didn't find any obvious samples. The problem is that native Win32 programming is getting pretty old.

At any rate, I'd recommend getting the book "Programming Windows, 5th Edition by Charles Petzold (http://www.charlespetzold.com/pw5/)". It's the standard when it comes to native Win32 programming.

hypheni
November 1st, 2009, 01:04 AM
ya. I own a e-copy of that book.. but that doesn't provide any such info regarding this. and also google cant help me to solve this.

hypheni
November 1st, 2009, 03:08 AM
Okay. I have solved it. Actually I did it before but forget. Here is the code. May this will help others in future.


SetClassLong(hMain, GCL_HICON, (LONG)LoadIcon(hIns, (MAKEINTRESOURCE)IDI_ICON1));