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:
@@ -872,17 +872,28 @@ void wxTopLevelWindowOS2::Restore()
|
||||
} // end of wxTopLevelWindowOS2::Restore
|
||||
|
||||
// generate an artificial resize event
|
||||
void wxTopLevelWindowOS2::SendSizeEvent()
|
||||
void wxTopLevelWindowOS2::SendSizeEvent(int flags)
|
||||
{
|
||||
if (!m_bIconized)
|
||||
{
|
||||
RECTL vRect = wxGetWindowRect(GetHwnd());
|
||||
|
||||
(void)::WinPostMsg( m_hFrame
|
||||
,WM_SIZE
|
||||
,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
|
||||
,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
|
||||
);
|
||||
if ( flags & wxSEND_EVENT_POST )
|
||||
{
|
||||
(void)::WinPostMsg( m_hFrame
|
||||
,WM_SIZE
|
||||
,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
|
||||
,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
|
||||
);
|
||||
}
|
||||
else // send it
|
||||
{
|
||||
(void)::WinSendMsg( m_hFrame
|
||||
,WM_SIZE
|
||||
,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
|
||||
,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom)
|
||||
);
|
||||
}
|
||||
}
|
||||
} // end of wxTopLevelWindowOS2::SendSizeEvent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user