I'm not very familar with WinAPI programming, so that's more or les a beginners question.
I'm currently porting a plain console-application to Windows. It does use only some socket functions and don't has any GUI, so this is an easy thing. To hide the ugly, black console I'm using
int APIENTRY WinMain()
and don't open any windows. Now I have to show a tray icon to just to notify user this application is running. I also found some nice example code demonstrating how to use Shell_NotifyIcon(). Where I'm failing at is loading of related icon:
niData.hIcon=
(HICON)LoadImage(hInstance,
MAKEINTRESOURCE(IDI_AAAA),
IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
LR_DEFAULTCOLOR);
I already have a .ico file containing severals icons in different sizes and a .rc file where IDI_AAAA points to this icon:
IDI_AAAA ICON "my_icon.ico"
.rc file is added to my project but the compiler - of course - complains it does not know IDI_AAAA. So...how do I have to make the connection from IDI_AAAA in .rc file to a valid definition in .cpp file making it possible for LoadImage() to get the icon?
Thanks!