zserge / tray

Cross-platform, super tiny C99 implementation of a system tray icon with a popup menu.
MIT License
493 stars 84 forks source link

[win] close menu if user clicks outside #6

Closed s-h-a-d-o-w closed 5 years ago

s-h-a-d-o-w commented 5 years ago

See also here ("Important: If you implement a context menu, it's vital that you set your window to the foreground before calling TrackPopupMenu to ensure the menu closes properly."): https://www.codeproject.com/Articles/4768/Basic-use-of-Shell-NotifyIcon-in-Win32