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
This commit is contained in:
@@ -357,6 +357,27 @@ void wxFrame::SetIcon(const wxIcon& icon)
|
|||||||
#endif // __WIN95__
|
#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
|
#if wxUSE_STATUSBAR
|
||||||
wxStatusBar *wxFrame::OnCreateStatusBar(int number,
|
wxStatusBar *wxFrame::OnCreateStatusBar(int number,
|
||||||
long style,
|
long style,
|
||||||
|
@@ -3163,6 +3163,7 @@ bool wxWindow::HandleGetMinMaxInfo(void *mmInfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// generate an artificial resize event
|
// generate an artificial resize event
|
||||||
|
/* FUNCTION IS NOW A MEMBER OF wxFrame - gt
|
||||||
void wxWindow::SendSizeEvent()
|
void wxWindow::SendSizeEvent()
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
@@ -3178,6 +3179,7 @@ void wxWindow::SendSizeEvent()
|
|||||||
(void)::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED,
|
(void)::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED,
|
||||||
MAKELPARAM(r.right - r.left, r.bottom - r.top));
|
MAKELPARAM(r.right - r.left, r.bottom - r.top));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// command messages
|
// command messages
|
||||||
|
Reference in New Issue
Block a user