]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
fixed warnings about possibly uninitialized variables; commented non trivial piece...
[wxWidgets.git] / src / msw / mdi.cpp
index 3d2ac43e30e6ace14f964ac0fe3bd28f2854d64c..3c93df9cc9cbc0ff62e284ddf215a031976b842d 100644 (file)
@@ -384,10 +384,14 @@ void wxMDIParentFrame::Cascade()
     ::SendMessage(GetWinHwnd(GetClientWindow()), WM_MDICASCADE, 0, 0);
 }
 
-// TODO: add a direction argument (hor/vert)
-void wxMDIParentFrame::Tile()
+void wxMDIParentFrame::Tile(wxOrientation orient)
 {
-    ::SendMessage(GetWinHwnd(GetClientWindow()), WM_MDITILE, MDITILE_HORIZONTAL, 0);
+    wxASSERT_MSG( orient == wxHORIZONTAL || orient == wxVERTICAL,
+                  _T("invalid orientation value") );
+
+    ::SendMessage(GetWinHwnd(GetClientWindow()), WM_MDITILE,
+                  orient == wxHORIZONTAL ? MDITILE_HORIZONTAL
+                                         : MDITILE_VERTICAL, 0);
 }
 
 void wxMDIParentFrame::ArrangeIcons()
@@ -817,7 +821,8 @@ void wxMDIChildFrame::DoSetClientSize(int width, int height)
 
   MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)true);
 
-  wxSizeEvent event(wxSize(width, height), m_windowId);
+  wxSize size(width, height);
+  wxSizeEvent event(size, m_windowId);
   event.SetEventObject( this );
   GetEventHandler()->ProcessEvent(event);
 }
@@ -1318,7 +1323,7 @@ void wxMDIChildFrame::OnIdle(wxIdleEvent& event)
     {
         Show(true);
     }
-    
+
     // MDI child frames get their WM_SIZE when they're constructed but at this
     // moment they don't have any children yet so all child windows will be
     // positioned incorrectly when they are added later - to fix this, we