Hi
I have a little problem with my tray icon, I fill the NOTIFYICONDATA struct with all the information I need and use Shell_NotifyIcon() to add a icon to tray.
The thing is that it works fine in a another editor and I tried various combos now...
Loading the icon from a file works, but I don't want that.. :
Yes, the .rc is in my project, the icon works for my main window and the small icon down at the sysbar...
And the tray icon works fine when i use devc++ :/ but not vc++
EDIT: I found one way of doing it, hopefully its right
1 2 3 4 5 6 7 8 9 10 11 12
HICON hicon; // Global
In winmain():
hicon=LoadIcon(hThisInstance,MAKEINTRESOURCE(IDI_ICON));
wincl.hIcon = CopyIcon(hicon);
wincl.hIconSm = CopyIcon(hicon);
Using it with NOTIFYICONDATA:
nid.hIcon = CopyIcon(hicon);
In WM_DESTROY:
DestroyIcon(hicon);