Notices

Water Fountain General Chit/Chat

Reply
 
LinkBack Thread Tools
Old 10-12-03, 07:48 PM   #1 (permalink)
Aximsite Rookie
 
Join Date: Aug 2003
Posts: 48
Thanked 0 Times in 0 Posts
Notify Icon dosn't delete.

Ok, I have a bit of a problem. When I close my program on my PocketPC (and I mean compleately kill the process) the icon it placed on the taskbar is gone, but the space allocated for it still exists. So any subsequent taskbar icons that are made will be one (or more if you run the program again and again) space off. I send a Shell_NotifyIcon with NIM_DELETE set... no compiler errors or anything... anyone have any clue why it is not showing? Just to be straight, here's the code for both ways.

setting up the icon (in WM_CREATE):
Code:
		case WM_CREATE:
			g_hwndCB = CreateRpCommandBar(hWnd);
            // Initialize the shell activate info structure
            memset (&s_sai, 0, sizeof (s_sai));
            s_sai.cbSize = sizeof (s_sai);
			// Plug the taskbar icon down there.
			notify_ico.hWnd = hWnd;
			notify_ico.uFlags = NIF_ICON;
			notify_ico.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_TASKBAR_CLEAR));
			notify_ico.cbSize = sizeof(NOTIFYICONDATA);
			notify_ico.uCallbackMessage = KLP_ICONACTIVATE;
			Shell_NotifyIcon(NIM_ADD, &notify_ico);
			break;
and in WM_DESTROY's corner:
Code:
		case WM_DESTROY:
			//destroy the Taskbar Icon
			Shell_NotifyIcon(NIM_DELETE, &notify_ico);

			CommandBar_Destroy(g_hwndCB);
			PostQuitMessage(0);
			break;
Sorry if this turns out to be an incredibly noobish question. I'm rather new at this... anyway, help is appreciated.:)

EDIT: gotta love webbrowsers, interpret ampersand and letters as something other than it should be.
__________________
-Compman

Last edited by compman; 10-12-03 at 07:51 PM.
compman is offline   Reply With Quote
Sponsor Ads
Old 10-14-03, 10:29 AM   #2 (permalink)
Aximsite Minor League
 
Join Date: Apr 2003
Posts: 283
Thanked 0 Times in 0 Posts

Awards Showcase
Aximsite Vendor 
Total Awards: 1

You need to fill the rest of the structure
At least the hWnd part
__________________
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
Reply

Sponsor Ads

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:41 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC