Anyone know what the exact spec's are for a tray icon. I have been using 16x16 and 16 color but it comes out looking gross and distorted on the system tray.
Posted on 2002-02-22 10:35:24 by rdaneel
well i know 16x16 is standard size but not sure about anything else.

when you created your icon what did you use? can i take a look at your icon im just curious about it.
Posted on 2002-02-22 12:33:24 by smurf
The standard is 16x16 but the actual size it's displayed depends on your taskbar size and font settings. The number of colors also seems to be restricted to 16 colors..

Thomas
Posted on 2002-02-22 12:37:11 by Thomas
Here is the icon. It looks great in Microangelo but then when it goes on the systray it looks like crap.
Posted on 2002-02-22 14:16:12 by rdaneel
hmm i tetsted your icon and it looks perfect in my system tray. i wonder how you are loading it in your app?
Posted on 2002-02-22 14:27:55 by smurf
Here is a couple of screen shots. The top one is the .ico file as it appears 16x16 in Explorer. The other is from my systray in what should be 16x16 also, but it looks kinda squashed and blurry.


Posted on 2002-02-22 14:42:58 by rdaneel
well i just wanted to let you know that went i tested your icon on my computer it looked exactly the same as your picture you posted. so yes there appears to be a sligtht modification to the icon in the tray but its really not too noticeable.
Posted on 2002-02-22 16:16:46 by smurf
use LoadImage to load the icon.

like:
invoke	LoadImage, hInstance, ICO_MINDSM, IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR
Posted on 2002-02-22 16:32:52 by savage
Well,

to be honest:

In the systray on your picture the ICON looks even cooler :grin:

Just my opinion

YaWNS aka Stefan K.
Posted on 2002-02-22 17:46:30 by YaWNS
Hello EveryBody

Could some one direct me to or know how to put your Icon in the .code section of a file (in writing). This is not something people do every day but i hoping that it is possible since a icon is a file itself. .. I'm thinking maybe i would have to write it in bindry form or Hex than figure out where to put it and make it show as normal as possible... Is this possible...

How about Painting an Icon with PAINT, but how would i get it to the bars....Any pointers would help...

Thanks
Posted on 2002-02-22 18:46:41 by cmax
cmax it actually pretty nasty little project to create a custom icon at runtime. here is some c++ code from microsoft on how to do it.
Posted on 2002-02-22 19:29:35 by smurf
I think that Windows ME and better draws the icon in the systray in 32 bit colors and Windows 95 and 98 only uses 16 colors.
Posted on 2002-02-23 05:56:18 by ante
true, you can patch explorer in 98/2k to have 256 colors tho:

http://www.dr-hoiby.com/TrayIconIn256Color/
Posted on 2002-02-23 06:11:18 by savage
Thanks smurf. Now i got an better idea and something to build from .... I want to Thank the other Guys also.

Now i will get out the way and let this post continue. Have you seen the lattest trayicon.zip at Icz site....
Posted on 2002-02-23 07:44:18 by cmax
Savage, that did the trick. What is the difference between LoadIcon and LoadImage that causes that?
Posted on 2002-02-23 15:19:02 by rdaneel
rdaneel,
From the api reference:
-----
LoadIcon can only load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric values. Use the LoadImage function to load icons of other sizes.
-----

so LoadIcon can only load the default resolution of 32x32.
Posted on 2002-02-23 15:27:44 by savage
LoadIcon was designed to load old 32x32 icons. If you use it to open a small icon (16x16) it will resize the image to 32x32 with antialiasing and then again to 16x16, so the blur effect.

Edit:
Ops.... I didn't see the second page and savage's answer :rolleyes:.
Posted on 2002-02-23 16:37:48 by LuHa
Very interesting. Thanks as always guys. I need to go modify all my apps now to use the correct call. I love tray icons for some reason. I put them in almost every app even when it's kinda useless. Keeps the main taskbar area clean and tidy.
Posted on 2002-02-24 00:06:26 by rdaneel
Don't let Paul DiLascia's worst nightmare come true... :grin:
Posted on 2002-02-24 10:20:22 by LuHa