Using TrayIcons



Application running in the background must not have an always-open window, but they need a user interface. Ideal for this case ist an icon in the system tray, which can diplay a popup menu. An icon can be added by the windows API Shell_NotifyIconA On mouse events over the icon a specified windows message (mostly WM_USER) is sent to the (invisible) window.


This example can
  • Place an icon in the system tray
  • watch mouse events on the icon
  • Open a menu on right or left click
  • Show the windows on double click
trayIcon.zip (7,01 kB)