question

drjackool-3839 avatar image
0 Votes"
drjackool-3839 asked drjackool-3839 commented

Notification tray menu problem (mfc, win32)

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

vs-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered drjackool-3839 commented

Old FAQ : KB135788


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

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."


1 Vote 1 ·

Oh yes! I did not read it carefully :-)

0 Votes 0 ·