Jump to content

  • Log In with Google      Sign In   
  • Create Account


The small icon doesn't show in taskbar?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 23 October 1999 - 07:35 PM

Hi,

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?


Sponsor:

#2 Sphet   Members   -  Reputation: 631

Like
Likes
Like

Posted 21 October 1999 - 06:23 AM

If you are using MFC in a funny way (which most of us do for game programming) or not using MFC at all, you need to set some of these yourself. The large icon is set by the call to AfxRegisterWndClass, but you can set the small one with:

SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), FALSE);

The boolean specifies if you are setting the BIG icon (TRUE) or the SMALL icon (FALSE)


#3 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 22 October 1999 - 02:45 AM

I'm using win32 and no it still doesn't show up even if I explicitly send a WM_SETICON message (which should be the SetIcon equiv).

Does it require registry entries or what?


#4 mordell   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 October 1999 - 05:48 AM


I would like to know the answer to this one if there is a reasonable solution.

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.

-mordell


#5 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 22 October 1999 - 07:45 PM

I was under the same impression too but Starcraft is minimized, the spaceship icon shows beside its class name in the taskbar. Mine doesn;t, although the icon is displayed in the file executable when I choose view large/small icon.

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?


#6 mordell   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 1999 - 03:01 AM


Ahhh....apologies!

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,
(LPARAM)LoadIcon(hApp, MAKEINTRESOURCE(IDI_ICON)));


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..?

-mordell


#7 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 23 October 1999 - 08:04 AM

Thanks but I have found the answer.

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.


#8 mordell   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 October 1999 - 01:47 PM


Void,

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.

-mordell



#9 Void   Members   -  Reputation: 126

Like
Likes
Like

Posted 23 October 1999 - 07:35 PM

Yes.. sorry about it.

it is WS_SYSMENU, not CS_SYSMENU...

An very annoying undocumented feature.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS