add PostSizeEvent() and use it in wxMSW status bar code (#9795)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -310,15 +310,24 @@ void wxFrame::Raise()
|
||||
}
|
||||
|
||||
// generate an artificial resize event
|
||||
void wxFrame::SendSizeEvent()
|
||||
void wxFrame::SendSizeEvent(int flags)
|
||||
{
|
||||
if ( !m_iconized )
|
||||
{
|
||||
RECT r = wxGetWindowRect(GetHwnd());
|
||||
|
||||
(void)::SendMessage(GetHwnd(), WM_SIZE,
|
||||
IsMaximized() ? SIZE_MAXIMIZED : SIZE_RESTORED,
|
||||
MAKELPARAM(r.right - r.left, r.bottom - r.top));
|
||||
if ( flags & wxSEND_EVENT_POST )
|
||||
{
|
||||
::PostMessage(GetHwnd(), WM_SIZE,
|
||||
IsMaximized() ? SIZE_MAXIMIZED : SIZE_RESTORED,
|
||||
MAKELPARAM(r.right - r.left, r.bottom - r.top));
|
||||
}
|
||||
else // send it
|
||||
{
|
||||
::SendMessage(GetHwnd(), WM_SIZE,
|
||||
IsMaximized() ? SIZE_MAXIMIZED : SIZE_RESTORED,
|
||||
MAKELPARAM(r.right - r.left, r.bottom - r.top));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user