Fix regression in wxTopLevelWindowMSW::IsMaximized()
This fixes another bug from3518f1a7d8
(after the one fixed in5766280311
): if a window was maximized by user and then hidden, its IsMaximized() returned false because it examined m_showCmd which didn't have SW_MAXIMIZE value in this case. The same was true for IsMinimised() as well. Fix both problems by updating the value of m_showCmd when hiding the window.
This commit is contained in:
@@ -579,6 +579,15 @@ bool wxTopLevelWindowMSW::Show(bool show)
|
||||
}
|
||||
else // hide
|
||||
{
|
||||
// When hiding the window, remember if it was maximized or iconized in
|
||||
// order to return the correct value from Is{Maximized,Iconized}().
|
||||
if ( ::IsZoomed(GetHwnd()) )
|
||||
m_showCmd = SW_MAXIMIZE;
|
||||
else if ( ::IsIconic(GetHwnd()) )
|
||||
m_showCmd = SW_MINIMIZE;
|
||||
else
|
||||
m_showCmd = SW_SHOW;
|
||||
|
||||
nShowCmd = SW_HIDE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user