]> git.saurik.com Git - wxWidgets.git/commitdiff
SendSizeEvent() method moved from wxWindow to wxFrame, as that is the only place...
authorGeorge Tasker <gtasker@allenbrook.com>
Sat, 31 Mar 2001 18:46:15 +0000 (18:46 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Sat, 31 Mar 2001 18:46:15 +0000 (18:46 +0000)
Fixed problems with MDI children being changed from min/max/restored in SetSizeEvent()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/frame.cpp
src/msw/window.cpp

index 2292c1c508d21534e23d1a6435bb1367db8f9eac..857089ffb13ecd3e13ed4c7857c7971441d51fbe 100644 (file)
@@ -357,6 +357,27 @@ void wxFrame::SetIcon(const wxIcon& icon)
 #endif // __WIN95__
 }
 
+// generate an artificial resize event
+void wxFrame::SendSizeEvent()
+{
+    RECT r;
+#ifdef __WIN16__
+    ::GetWindowRect(GetHwnd(), &r);
+#else
+    if ( !::GetWindowRect(GetHwnd(), &r) )
+    {
+        wxLogLastError(_T("GetWindowRect"));
+    }
+#endif
+
+    if ( !m_iconized )
+    {
+        (void)::PostMessage(GetHwnd(), WM_SIZE,
+                            IsMaximized() ? SIZE_MAXIMIZED : SIZE_RESTORED,
+                            MAKELPARAM(r.right - r.left, r.bottom - r.top));
+    }
+}
+
 #if wxUSE_STATUSBAR
 wxStatusBar *wxFrame::OnCreateStatusBar(int number,
                                         long style,
index 8ec677be5efdcbc7fdc1a0787d3e253c89f39c07..4a6d863b2d0cf8136d18d62ea21e60d5715b82e0 100644 (file)
@@ -3163,6 +3163,7 @@ bool wxWindow::HandleGetMinMaxInfo(void *mmInfo)
 }
 
 // generate an artificial resize event
+/* FUNCTION IS NOW A MEMBER OF wxFrame - gt
 void wxWindow::SendSizeEvent()
 {
     RECT r;
@@ -3178,6 +3179,7 @@ void wxWindow::SendSizeEvent()
     (void)::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED,
                         MAKELPARAM(r.right - r.left, r.bottom - r.top));
 }
+*/
 
 // ---------------------------------------------------------------------------
 // command messages