Small icon vs Large icon
-
I'm using Chris Maunder's excellent CSystemTray class and I'm having some odd behavior that has to do with icon size. I don't believe that this has anything to do with Chris' class, but I thought I'd throw that in. What I'm finding is that the tray icon that's being inserted is the icon for my application, but an interpolated version of the large icon, not the real 16 x 16 icon. I've messed with SetIcon(icon,TRUE/FALSE) before inserting the icon in the tray to no avail. What's the proper procedure for guaranteeing the proper icon displays. Paul Oss
-
I'm using Chris Maunder's excellent CSystemTray class and I'm having some odd behavior that has to do with icon size. I don't believe that this has anything to do with Chris' class, but I thought I'd throw that in. What I'm finding is that the tray icon that's being inserted is the icon for my application, but an interpolated version of the large icon, not the real 16 x 16 icon. I've messed with SetIcon(icon,TRUE/FALSE) before inserting the icon in the tray to no avail. What's the proper procedure for guaranteeing the proper icon displays. Paul Oss
Have you tried explicitly loading the 16x16 version of your icon, then setting this into the tray class? I have run into this problem before, when just dealing with the shell tray directly.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
I'm using Chris Maunder's excellent CSystemTray class and I'm having some odd behavior that has to do with icon size. I don't believe that this has anything to do with Chris' class, but I thought I'd throw that in. What I'm finding is that the tray icon that's being inserted is the icon for my application, but an interpolated version of the large icon, not the real 16 x 16 icon. I've messed with SetIcon(icon,TRUE/FALSE) before inserting the icon in the tray to no avail. What's the proper procedure for guaranteeing the proper icon displays. Paul Oss
Be sure you use LoadImage() to load a 16x16 icon. LoadIcon() only loads 32x32 (the AppWizard generated code does this, but it's buggy). --Mike-- "I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
Have you tried explicitly loading the 16x16 version of your icon, then setting this into the tray class? I have run into this problem before, when just dealing with the shell tray directly.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
I have not. I guess I'm ignorant as to how to do that. I know how to load the icon (as resource) and then set the 16 x 16 through the SetIcon(xxx,BOOL) api (but that's not working for me). How do I explicitly load the 16 x 16 icon? Paul Oss
You need to use the ::LoadImage API function, and specify the size for the icon, 16 x 16. Also, for the tray with anything below Win2000 and win9x you can only use the VGA palette for systray icons. Good Luck
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!