extracted wxFrame::MSWTranslateMessage() implementation into new MSWDoTranslateMessage so that it can be reused by wxMDIChildFrame; this allows to pass the correct window to ::TranslateAccelerator() and fix UI updating of the MDI child menu items (bug 1214439)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-01-23 16:38:07 +00:00
parent a1a1ca8998
commit 1ac7660914
3 changed files with 18 additions and 7 deletions

View File

@@ -1165,7 +1165,9 @@ WXLRESULT wxMDIChildFrame::MSWDefWindowProc(WXUINT message, WXWPARAM wParam, WXL
bool wxMDIChildFrame::MSWTranslateMessage(WXMSG* msg)
{
return wxFrame::MSWTranslateMessage(msg);
// we must pass the parent frame to ::TranslateAccelerator(), otherwise it
// doesn't do its job correctly for MDI child menus
return MSWDoTranslateMessage((wxMDIChildFrame *)GetParent(), msg);
}
// ---------------------------------------------------------------------------