Link to home
Start Free TrialLog in
Avatar of amakalski
amakalski

asked on

What should be icon size that goes to systray

I want to put an icon in systray, but I don't know what size icon should be?
Avatar of ks5d
ks5d

OK, this isn't really a C++ question, but here goes:

from: http://www.techtv.com/callforhelp/howto/story/0,24330,3332137,00.html

"Icons come in three different sizes: 16x16, 32x32, and 48x48. 32x32 is the default, the size you see on your desktop. To create icons for your system tray or taskbar, go with 16x16."

Also, more to the programming interest of this board, here's an MSDN article describing how to create a system tray application:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp06102002.asp
Avatar of amakalski

ASKER

This type of question is difficult to find section for.
I created 16x16 pixels icon, it looks ok in Resource Editor
but on systray it looks like it was squeezed a bit. Is it normal ?
ASKER CERTIFIED SOLUTION
Avatar of ks5d
ks5d

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I used
nid.hIcon = AfxGetApp()->LoadIcon(IDI_SYSTEMTRAY_ICON2);
and I deleted 32x32 version from resource, but icon still looked bad.
I noticed that http://www.codeguru.com/mfc/comments/9525.shtml
uses different icon load method, so I tried using
nid.hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_SYSTEMTRAY_ICON2), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
Now the icon looks exactly as original.
Thank you.