...but that only works if you created the thing yourself and have the ???? value. Normally the taskbar icon comes with the window, without asking for ????. So the real question is: How do I get the thing's id?
-Jay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, sorry, I misunderstood your question. If you didn't create it yourself, then I have no idea. You probably couldn't remove it even if you had the ID as each ID is unique to the process that called it so you would probably get an "access denied" type of detail from GetLastError(). Because everytime you clicked a button in one of the programs you made, it might go to every other process's WM_COMMAND and be intercepted as one of their own. =)
Kip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know how it's done..
NOTIFYICONDATA nid;
nid.cbSize = sizeof (NOTIFYICONDATA);
nid.hWnd = hwnd;
nid.uID = ????;
Shell_NotifyIcon(NIM_DELETE, &nid);
...but that only works if you created the thing yourself and have the ???? value. Normally the taskbar icon comes with the window, without asking for ????. So the real question is: How do I get the thing's id?
-Jay
Well, the uID is whatever you would like. In vToDo, you can use something like...
#define UM_SHELL WM_USER + 10
Then in the structure before the call to Shell_NotifyIcon(), use UM_SHELL for nid.uID. Then in your WndProc...
WndProc()
{
case UM_SHELL:
LoadMenu(GetMenu());
TrackPopupMenu();
return FALSE;
}
Hope that helps =)
Kip
Ah, sorry, I misunderstood your question. If you didn't create it yourself, then I have no idea. You probably couldn't remove it even if you had the ID as each ID is unique to the process that called it so you would probably get an "access denied" type of detail from GetLastError(). Because everytime you clicked a button in one of the programs you made, it might go to every other process's WM_COMMAND and be intercepted as one of their own. =)
Kip