// MyTaskBarDeleteIcon - deletes an icon from the taskbar // status area. // Returns TRUE if successful or FALSE otherwise. // hwnd - handle of the window that added the icon // uID - identifier of the icon to delete BOOL MyTaskBarDeleteIcon(HWND hwnd, UINT uID) { BOOL res; NOTIFYICONDATA tnid; tnid.cbSize = sizeof(NOTIFYICONDATA); tnid.hWnd = hwnd; tnid.uID = uID; res = Shell_NotifyIcon(NIM_DELETE, &tnid); return res; }