]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
fixes bug 414369
[wxWidgets.git] / src / msw / frame.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,