]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
Strip menu codes from page label for consistency with other platforms
[wxWidgets.git] / src / msw / mdi.cpp
index 7114765e93ab331640e7612d3386d34ab33b4a10..e4f5961386775225ba944f03e2790e915dbfa5a2 100644 (file)
@@ -515,7 +515,7 @@ bool wxMDIParentFrame::HandleActivate(int state, bool minimized, WXHWND activate
     {
         wxActivateEvent event(wxEVT_ACTIVATE, true, m_currentChild->GetId());
         event.SetEventObject( m_currentChild );
-        if ( m_currentChild->GetEventHandler()->ProcessEvent(event) )
+        if ( m_currentChild->HandleWindowEvent(event) )
             processed = true;
     }
 
@@ -601,8 +601,8 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
             wxWindow *child = node->GetData();
             if ( child->GetHWND() )
             {
-                long childId = wxGetWindowId(child->GetHWND());
-                if (childId == (long)id)
+                int childId = wxGetWindowId(child->GetHWND());
+                if ( childId == (signed short)id )
                 {
                     ::SendMessage( GetWinHwnd(GetClientWindow()),
                                    WM_MDIACTIVATE,
@@ -694,7 +694,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
   if ( id != wxID_ANY )
     m_windowId = id;
   else
-    m_windowId = (int)NewControlId();
+    m_windowId = NewControlId();
 
   if ( parent )
   {
@@ -853,7 +853,7 @@ void wxMDIChildFrame::DoSetClientSize(int width, int height)
   wxSize size(width, height);
   wxSizeEvent event(size, m_windowId);
   event.SetEventObject( this );
-  GetEventHandler()->ProcessEvent(event);
+  HandleWindowEvent(event);
 }
 
 // Unlike other wxTopLevelWindowBase, the mdi child's "GetPosition" is not the
@@ -1103,7 +1103,7 @@ bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
 
     ResetWindowStyle((void *)NULL);
 
-    return GetEventHandler()->ProcessEvent(event);
+    return HandleWindowEvent(event);
 }
 
 bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)