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:
Vadim Zeitlin
2007-05-18 17:03:38 +00:00
parent 722ed5bed5
commit 10816efb2c
4 changed files with 34 additions and 29 deletions

View File

@@ -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