So I have a program which doesn't have a console. It starts up by making a dummy HWND which it then hides and then acts as a notification area application (stays in tray). People can hover over the program to view its status and press hotkeys to perform tasks on screen.
Anyway, I want to display my programs icon in the tray but cannot. I added the icon resource to Visual studio and my executable has an icon in explorer. The resource has sizes from 16x16 - 256x256.
Now, I set NOTIFYICONDATA's info to: nid.hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_ICON1));
and included "resource.h"
Which defines IDI_ICON1 as 104. However when I use this the blue explanation point icon shows up (ie one of the windows default ones). I tried IDI_ERROR and the error icon showed up fine. I tried a custom 12x12 icon as I read size may be the issue but that didnt work either.
IDI_APPLICATION uses the default icon for the application, ie the default .exe icon.
I currently don't know what to try or do.
Thanks in advance for your help!