Merge branch 'menu_highlight_event' of https://github.com/imciner2/wxWidgets

Set menu object for the menu highlight events too.

See https://github.com/wxWidgets/wxWidgets/pull/1506
This commit is contained in:
Vadim Zeitlin
2019-08-27 13:13:23 +02:00
6 changed files with 30 additions and 24 deletions

View File

@@ -2420,8 +2420,9 @@ wxWindowMSW::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU hMenu)
if ( flags & (MF_POPUP | MF_SEPARATOR) )
item = wxID_NONE;
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
if ( wxMenu::ProcessMenuEvent(MSWFindMenuFromHMENU(hMenu), event, this) )
wxMenu* menu = MSWFindMenuFromHMENU(hMenu);
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item, menu);
if ( wxMenu::ProcessMenuEvent(menu, event, this) )
return true;
// by default, i.e. if the event wasn't handled above, clear the status bar