I was under the impression the taskbar would show the small icon besides the class name when u set the wndclass icon member but it seems not to?
Anyone knows how to do it?
Jump to content
Posted 21 October 1999 - 06:23 AM
The boolean specifies if you are setting the BIG icon (TRUE) or the SMALL icon (FALSE)
Posted 22 October 1999 - 05:48 AM
My understanding of the big and small icons is so that your application conforms to the windows display.
Windows actually selects which icon to display depending on the context of which it is viewed.
For instance, the big icon (32x32) is displayed in the task bar, while the small icon (16x16) is displayed when you view your .exe in explorer. If the small icon is not available, then the big icon is scaled to size.
Posted 22 October 1999 - 07:45 PM
Every active program has an icon besides the class name in the taskbar, except mine? What else do I set to set besides the icon while registering the class?
Posted 23 October 1999 - 03:01 AM
I was under the impression you wanted your small icon to appear in the task bar, not that you didn't see your icon at all in the task bar!
I guess make sure that when you are building your WNDCLASSEX data you verify that LoadIcon succeeds.
Also, in the case of dialogs, you can set the icon like so:
SendMessage(hwndDlg, WM_SETICON, ICON_BIG,
hmm..I was toying around with getting the small icon to appear in the caption and the task bar and this seems to work:
wcex.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_WIN32), IMAGE_ICON, 16, 16, 0);
The icon IDI_WIN32 contains both a 32x32 and a 16x16 icon, LoadImage apparently loaded the correct icon based on the size params I passed in.
Afraid thats not a whole lot of help with your problem, tho. Maybe if you post your window registration code..?
Posted 23 October 1999 - 08:04 AM
You need to set the CS_SYSMENU flag when u register the class or the icon will never show. I guess MFC does that behind the scenes but too bad I'm not using it.
but in doing so I seem to find a disturbing fact about dx. Will post more of it once I tested my findings.
Posted 23 October 1999 - 01:47 PM
Where did you find information about CS_SYSMENU? What does it do?
I have never used it. The only style flags I have ever used when registering a class is CS_HREDRAW | CS_VREDRAW and occasionally CS_OWNDC...thats about it.
The only reason I mention it is because I do not use MFC, and my apps have always had an icon in the taskbar or caption. The only thing I do is set the icon params of the WNDCLASSEX structure prior to RegisterClassEx.
ack! I just thought of something! Do you mean WS_SYSMENU, a style flag used in the call to CreateWindowEx? That could be it then, I typically use the WS_OVERLAPPEDWINDOW style, which includes WS_SYSMENU. That could explain it.