I'm writing a windows application that has an icon in the TaskBar status area. In order to do that I'm using Shell_NotifyIcon . Everything is ok except for one thing: the icon doesn't show very well.
Why does my application icon looks so awful in the TaskBar status area, especially when it looks perfectly in the Windows explorer?
I've got another more question. As you see in the web page I've written to describe my problem, the .ico files actually contains 8 icons. How can I access every icon individually if for example I want to extract them? If I don't indicate anything, which is what I'm doing now, which icon is the one that Windows chooses to show in the TaskBar status area? Does Windows choose it automatically or is there any way I can indicate which to use? Do I have to do it?
Windows®. Windows 95, Windows 98, and Microsoft Windows NT® 4.0 support icons of up to 4 bits per pixel (BPP). Windows Millennium Edition (Windows Me) and Windows 2000 support icons of a color depth up to the current display mode. Windows XP supports icons of up to 32 BPP.
What OS are you running?
Edit: This refers to tray icons.
Last edited by Bond; August 16th, 2004 at 03:16 PM.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
I'm using Windows 2000 and it is configured to 16 bits colors.
The question is tha Windows explorer shows the icon perfectly, so my system is capable of showing this kind of icons but, why doesn't it seems to work when I set the icon programmatically?
From MSDN: Windows®. Windows 95, Windows 98, and Microsoft Windows NT® 4.0 support icons of up to 4 bits per pixel (BPP). Windows Millennium Edition (Windows Me) and Windows 2000 support icons of a color depth up to the current display mode. Windows XP supports icons of up to 32 BPP.
In my experience, all but Windows XP support 16-colour only icons.
The question is tha Windows explorer shows the icon perfectly, so my system is capable of showing this kind of icons but, why doesn't it seems to work when I set the icon programmatically?
That's why I added the note to say that it refers to tray icons only. They are limited in the number of colors they can use, pre-XP.
For example, if you do this:
Code:
SendMessage(hwnd, WM_SETICON, ICON_SMALL, hIcon);
you should see the icon the way you want to in the caption bar. As for the tray, you should design an icon specifically for it that uses a minimum number of colors, for pre-XP systems.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
I must confess I'm still a little bit confused. I'm going to attach some files to this post so that you can see clearly my problem.
cube_blue.zip is the icon I'm trying to put in the system tray programatically, and pc-resolution.gif is a capture of my resolution settings. I'm using Windows 2000, as I mentioned before.
cuble_blue.ico actually contains 8 icons, as you can see in img02.gif:
Are you saying that Windows 2000 can't show none of these icons despite Windows Explorer really can, as you can see in img01.gif? Can Windows 2000 show only 16 colors icons in the system tray?
If that's the point, I suppose I must write a rotuine to determine Windows version and put a particular icon depending on it, right?
I haven't downloaded your files yet, but yes, that's basically what I'm saying. The icons created in the tray notification area may only have a limited number of colors for all pre-Windows XP systems. For my machine, which has Windows 2000, it looks like a 16 or 32 color restriction.
I have PGP and Outlook (obviously both are professional applications) running right now in my system tray and both of their tray icons are boring and dull in color. If I open Outlook, however, and look at the icon in the caption bar, it's very colorful. So, like I said, it's a restriction for the tray notification area only, for pre-XP systems.
On my XP machine, which also has these programs installed, they have much cooler tray icons.
Last edited by Bond; August 17th, 2004 at 03:07 PM.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.