From: George Tasker Date: Sat, 31 Mar 2001 18:46:15 +0000 (+0000) Subject: SendSizeEvent() method moved from wxWindow to wxFrame, as that is the only place... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/67bd5bad041419c4714d09749737d5ea9876a47d SendSizeEvent() method moved from wxWindow to wxFrame, as that is the only place that the code in this function applies to. 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 --- diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 2292c1c508..857089ffb1 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -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, diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 8ec677be5e..4a6d863b2d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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