Removing another program's Icon from systray.
Posted on 1999-01-06
How can you remove another application's icon from the systray programatically? shell_notifyicon is no use without knowing the the .uID param of NOTIFYICONDATA struct. I have used Soft Ice to determine that shell_notifyicona actually just invokes SendMessage(shell_trayhwnd, WM_COPYDATA, hwnd source, COPYDATA struct), where the COPYDATA struct must contain info gleaned from the NOTIFYICONDATA struct originally passed to shell_notifyicon. If I could get a handle to the icon, I would just use DestroyIcon... but I can't seem to find a way to get the handle to the icon.