-#if wxUSE_MENUS
-
-bool
-wxFrame::HandleMenuSelect(WXWORD nItem, WXWORD flags, WXHMENU WXUNUSED(hMenu))
-{
- // sign extend to int from unsigned short we get from Windows
- int item = (signed short)nItem;
-
- // WM_MENUSELECT is generated for both normal items and menus, including
- // the top level menus of the menu bar, which can't be represented using
- // any valid identifier in wxMenuEvent so use an otherwise unused value for
- // them
- if ( flags & (MF_POPUP | MF_SEPARATOR) )
- item = wxID_NONE;
-
- wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item);
- event.SetEventObject(this);
-
- if ( HandleWindowEvent(event) )
- return true;
-
- // by default, i.e. if the event wasn't handled above, clear the status bar
- // text when an item which can't have any associated help string in wx API
- // is selected
- if ( item == wxID_NONE )
- DoGiveHelp(wxEmptyString, true);
-
- return false;
-}
-
-bool wxFrame::HandleMenuPopup(wxEventType evtType, WXHMENU hMenu)
-{
- // we don't have the menu id here, so we use the id to specify if the event
- // was from a popup menu or a normal one
-
- int menuid = 0;
- wxMenu* menu = NULL;
- if (GetMenuBar())
- {
- menu = GetMenuBar()->MSWGetMenu(hMenu);
- }
- else if ( wxCurrentPopupMenu && wxCurrentPopupMenu->GetHMenu() == hMenu )
- {
- menu = wxCurrentPopupMenu;
- menuid = wxID_ANY;
- }
-
- wxMenuEvent event(evtType, menuid, menu);
- event.SetEventObject(this);
-
- return HandleWindowEvent(event);
-}
-
-#endif // wxUSE_MENUS
-