Home > Back-end >  How to close the menu when close the window
How to close the menu when close the window

Time:12-17

Have two Windows, the login window and the main window, after login according to the main window; In the main window right-click pop-up menu, and then the main window for other reasons to return to the login window, but the menu is still exist; The DestroyMenu there is no effect;
The popup menu is TrackPopupMenu ;

CodePudding user response:

In the MFC simulation:
Window 1 is landing window, the window 2 is the main window.
Login window 1, hide yourself, show window 2 (non-modal);
Window 2 time log out, then the pop-up menu, waiting for cancellation; Log out hidden himself and displayed his father;
Results: the menu will normally disappear;
Before I was with the duilib do, is also the login window hide themselves after login, non-modal shows the main window, but the main window is kicked, hide yourself, go back to the login window, but before the menu is showing,
  • Related