Rantic
March 17th, 2004, 09:59 AM
Im using notifyIconData to put an icon in the system tray. Im using LoadIcon() to pass the handle to the hIcon member of notifyIconData and i have my icon loaded as a resource IDI_ICON1. The problem is the icon dosnt appear but a blank space on the tray appears instead and i can click on the blank space to bring up my dialog ok, but i want the icon to display.
heres a code snippet :
notifyIconData.cbSize = sizeof( NOTIFYICONDATA ) ;
notifyIconData.hWnd = hwnd ;
notifyIconData.uID = TRAYICON_ID ;
notifyIconData.uFlags = NIF_MESSAGE | NIF_ICON
notifyIconData.hIcon= LoadIcon(hThisInstance,MAKEINTRESOURCE(IDI_ICON1));
notifyIconData.uCallbackMessage = WM_TRAYICONMSG ;
Shell_NotifyIcon(NIM_ADD, ¬ifyIconData);
am i doing something wrong here? I cant understand why my icon wont display in the tray.
thanks,
r
heres a code snippet :
notifyIconData.cbSize = sizeof( NOTIFYICONDATA ) ;
notifyIconData.hWnd = hwnd ;
notifyIconData.uID = TRAYICON_ID ;
notifyIconData.uFlags = NIF_MESSAGE | NIF_ICON
notifyIconData.hIcon= LoadIcon(hThisInstance,MAKEINTRESOURCE(IDI_ICON1));
notifyIconData.uCallbackMessage = WM_TRAYICONMSG ;
Shell_NotifyIcon(NIM_ADD, ¬ifyIconData);
am i doing something wrong here? I cant understand why my icon wont display in the tray.
thanks,
r