Search code examples
csystem-tray

Catch click on balloon tray icon


How to catch click on balloon tray icon? What message it sends to window? Scenario: The application shows balloon and user clicks on some point in the balloon space or to close button on balloon form.


Solution

  • The message you get sent is always the one you passed to Shell_NotifyIcon. The lParam of the message will be NIN_BALLOONUSERCLICK. You don't get to find out whether the user clicks the close button or not.