added virtual wxFrame::FindItemInMenuBar(): overriding it in wxMDIParentFrame allows to look for the items in the active child when giving help for the current menu item
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -315,6 +315,17 @@ void wxMDIParentFrame::DoMenuUpdates(wxMenu* menu)
|
||||
}
|
||||
}
|
||||
|
||||
const wxMenuItem *wxMDIParentFrame::FindItemInMenuBar(int menuId) const
|
||||
{
|
||||
const wxMenuItem *item = wxFrame::FindItemInMenuBar(menuId);
|
||||
if ( !item && m_currentChild )
|
||||
{
|
||||
item = m_currentChild->FindItemInMenuBar(menuId);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
void wxMDIParentFrame::UpdateClientSize()
|
||||
{
|
||||
if ( GetClientWindow() )
|
||||
@@ -475,24 +486,6 @@ WXLRESULT wxMDIParentFrame::MSWWindowProc(WXUINT message,
|
||||
rc = true;
|
||||
break;
|
||||
|
||||
case WM_MENUSELECT:
|
||||
{
|
||||
WXWORD item, flags;
|
||||
WXHMENU hmenu;
|
||||
UnpackMenuSelect(wParam, lParam, &item, &flags, &hmenu);
|
||||
|
||||
if ( m_parentFrameActive )
|
||||
{
|
||||
processed = HandleMenuSelect(item, flags, hmenu);
|
||||
}
|
||||
else if (m_currentChild)
|
||||
{
|
||||
processed = m_currentChild->
|
||||
HandleMenuSelect(item, flags, hmenu);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
// though we don't (usually) resize the MDI client to exactly fit the
|
||||
// client area we need to pass this one to DefFrameProc to allow the children to show
|
||||
|
Reference in New Issue
Block a user