Thread: System Tray
View Single Post
Old 08-10-03, 04:58 PM   #5 (permalink)
ymawad
Aximsite Minor League
 
Join Date: Apr 2003
Posts: 283
Thanked 0 Times in 0 Posts

Awards Showcase
Aximsite Vendor 
Total Awards: 1

Quote:
Originally posted by compman
Well I have the NOTIFYICONDATA structure done and stuff but Shell_NotifyIcon dosn't display anything in the taskbar.... seeing as I'm getting no examples, perhaps my noobish code will point out the problem... lol

Code:
n_icondat.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_FIREWALL));
n_icondat.uFlags = NIF_ICON | NIF_MESSAGE;
n_icondat.uCallbackMessage = WM_ACTIVATE;
n_icondat.hWnd = g_hwndCB;
n_icondat.cbSize = sizeof(n_icondat);
Shell_NotifyIcon(NIM_ADD, &n_icondat);

1st, make sure you empty the whole structure
memset(&n_icondat, 0, sizeof(NOTIFYICONDATA));

2nd, I usually use
sizeof(NOTIFYICONDATA);

3rd, Are you sure the ICON you'r loading is a 16x16

4th, (and this is maybe why it doesn't show) give your icon an ID
n_icondat.uID= <some ID>;

5th, I reserve the right to get a free copy of your software once done :D

Godd luck
;)
__________________
Check our products at
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ymawad is offline   Reply With Quote