Shell_NotifyIcon icon invisible when building with VS 2005 for PPC 2003 target

I'm using Shell_NotifyIcon to put a icon in the task bar status area at the bottom of the screen. The code works correctly when I build and deploy to a WM5 device using VS2005. You see the icon in the bottom of the screen and if it is clicked my applicaiton gets notified.

When I build and deploy the same code and project to a PPC 2003 device the icon is invisible. I have verified that it has been place on the task bar, if you click where it should be my application gets notified.

I verified that Shell_NotifyIcon is returning true, implying success. I verified that the icon handle is not null in the NOTIFYICONDATA structure.

The icon I am trying to use includes 16 X 16 16 color and 32 X 32 16 color images. I tried adding 256 color images to the same icon. No change.

Anyone have any idea why the icon is invisible on a PPC 2003 device.



Answer this question

Shell_NotifyIcon icon invisible when building with VS 2005 for PPC 2003 target

  • Dan Dittenhafer

    Do you use CreateIconIndirect or LoadImage

    Icons createt at runtime with CreateIconIndirect sometimes disappear if set with NIM_MODIFY and the same icon handle. This is a bug in Windows Mobile (not in CEBase).

    LoadImage loads the first icon image from a multiple image resource. So if your icon file contains a 16x16 image and a 32x32 image, make sure that the 16x16 image is the first one (or use a single 16x16-Icon).


  • MarkNi

    I was loading the icon with LoadImage. Loading an icon that only had a 16X6 icon resolved the problem.
  • Shell_NotifyIcon icon invisible when building with VS 2005 for PPC 2003 target