hi
In my app I add a notification tray icon and when user right click on it a pop-up menu is displayed but when not selecting a menu item, and clicking outside the menu the menu not closed and keeps open. how solve this problem?
thanks
hi
In my app I add a notification tray icon and when user right click on it a pop-up menu is displayed but when not selecting a menu item, and clicking outside the menu the menu not closed and keeps open. how solve this problem?
thanks
Old FAQ : KB135788
Yes indeed. And this is documented here - TrackPopupMenu function (and also for TrackPopupMenuEx)- "To display a context menu for a notification icon, the current window must be the foreground window before the application calls TrackPopupMenu or TrackPopupMenuEx. Otherwise, the menu will not disappear when the user clicks outside of the menu or the window that created the menu (if it is visible). If the current window is a child window, you must set the (top-level) parent window as the foreground window."
9 people are following this question.