}
}
-const wxMenuItem *wxMDIParentFrame::FindItemInMenuBar(int menuId) const
+wxMenuItem *wxMDIParentFrame::FindItemInMenuBar(int menuId) const
{
- const wxMenuItem *item = wxFrame::FindItemInMenuBar(menuId);
+ wxMenuItem *item = wxFrame::FindItemInMenuBar(menuId);
if ( !item && GetActiveChild() )
{
item = GetActiveChild()->FindItemInMenuBar(menuId);
}
+ if ( !item && m_windowMenu )
+ item = m_windowMenu->FindItem(menuId);
+
return item;
}
::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, lParam);
}
-wxMenuItem *wxMDIParentFrame::MSWFindMenuBarItem(WXWORD id)
-{
- wxMenuItem *mitem = wxFrame::MSWFindMenuBarItem(id);
- if ( !mitem && m_windowMenu )
- mitem = m_windowMenu->FindItem((signed short)id);
-
- return mitem;
-}
-
#endif // wxUSE_MENUS
bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
// but it doesn't check for the (custom) accelerators of the window menu
// items as it's not part of the menu bar as it's handled by Windows itself
// so we need to do this explicitly
- if ( m_accelWindowMenu->Translate(this, msg) )
+ if ( m_accelWindowMenu && m_accelWindowMenu->Translate(this, msg) )
return true;
#endif // wxUSE_MENUS && wxUSE_ACCEL