]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
1. DoSetSize() simplified, DoGetBestSize() introduced
[wxWidgets.git] / src / msw / mdi.cpp
index 0a434266202269f3d0ca2febc1475649b834a430..551c1cc4ec49a1b8862254b0781f9d34c4cba520 100644 (file)
@@ -537,10 +537,7 @@ bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg)
         return TRUE;
     }
 
-    if ( m_acceleratorTable.Ok() &&
-         ::TranslateAccelerator(GetHwnd(),
-                                GetTableHaccel(m_acceleratorTable),
-                                pMsg) )
+    if ( m_acceleratorTable.Translate(this, msg) )
     {
         return TRUE;
     }
@@ -993,15 +990,7 @@ long wxMDIChildFrame::MSWDefWindowProc(WXUINT message, WXUINT wParam, WXLPARAM l
 
 bool wxMDIChildFrame::MSWTranslateMessage(WXMSG* msg)
 {
-    MSG *pMsg = (MSG *)msg;
-    if ( m_acceleratorTable.Ok() )
-    {
-        return ::TranslateAccelerator(GetWinHwnd(GetParent()),
-                                      GetTableHaccel(m_acceleratorTable),
-                                      pMsg) != 0;
-    }
-
-    return FALSE;
+    return m_acceleratorTable.Translate(GetParent(), msg);
 }
 
 // ---------------------------------------------------------------------------