Category Archives: win32

How to detect if your system tray icon has gone missing, C/C++, Win32

The Problem:

Sometimes if either the desktop crashes or windows decides to go wrong for whatever reason, it re-creates the system tray. There is no way to detect when that happens and your icon is now missing but your system tray application is still running.

The Solution:

Windows does send a windows message to be notified when the system tray is being created.  It won’t be sent to you unless you register to receive it.

To register to receive the message do the following and store the ID that is returned. The simplest way to do this is to store it in a global variable.

Then later on in your windows message loop handle the message.

 

Related Links

Related Searches

  • how to detect if the system tray is gone msdn
  • how to detect if the system tray is gone
  • systray icon restart after explore.exe crashes
  • catch explore restart message msdn
  • win32 message for when explorer.exe starts msdn
  • windows message for when explorer.exe starts msdn
  • systray icon dissapears after sleep
  • windows message for when system awakes from sleep
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisShare on RedditShare on StumbleUpon