Complete wxEVT_MENU_{OPEN,CLOSE} implementation in wxMSW and wxOSX.

Set the wxMenu correctly for wxEVT_MENU_CLOSE events in wxMSW.

Set the menu id correctly to allow wxMenuEvent::IsPopup() to work for both
wxEVT_MENU_OPEN and wxEVT_MENU_CLOSE in wxOSX.

Closes #11313.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-28 13:51:17 +00:00
parent c2cd367f7d
commit 7f3f059ac5
6 changed files with 39 additions and 24 deletions

View File

@@ -79,7 +79,6 @@ public:
bool HandleSize(int x, int y, WXUINT flag);
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
bool HandleMenuLoop(const wxEventType& evtType, WXWORD isPopup);
// tooltip management
#if wxUSE_TOOLTIPS
@@ -133,8 +132,8 @@ protected:
// wxMDIChildFrame
bool MSWDoTranslateMessage(wxFrame *frame, WXMSG *msg);
// handle WM_INITMENUPOPUP message to generate wxEVT_MENU_OPEN
bool HandleInitMenuPopup(WXHMENU hMenu);
// handle WM_(UN)INITMENUPOPUP message to generate wxEVT_MENU_OPEN/CLOSE
bool HandleMenuPopup(wxEventType evtType, WXHMENU hMenu);
virtual bool IsMDIChild() const { return false; }