]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
No changes, just use CPPUNIT_ASSERT_EQUAL() instead of CPPUNIT_ASSERT().
[wxWidgets.git] / src / msw / toplevel.cpp
index 495b865e52498f057c7907980458eeb794dc1fd5..3d7ccb58b2f61152b235c3569587f43d912fc135 100644 (file)
@@ -33,6 +33,7 @@
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/frame.h"
+    #include "wx/menu.h"
     #include "wx/containr.h"        // wxSetFocusToChild()
     #include "wx/module.h"
 #endif //WX_PRECOMP
@@ -637,7 +638,13 @@ void wxTopLevelWindowMSW::DoShowWindow(int nShowCmd)
 {
     ::ShowWindow(GetHwnd(), nShowCmd);
 
-    m_iconized = nShowCmd == SW_MINIMIZE;
+    // Hiding the window doesn't change its iconized state.
+    if ( nShowCmd != SW_HIDE )
+    {
+        // Otherwise restoring, maximizing or showing the window normally also
+        // makes it not iconized and only minimizing it does make it iconized.
+        m_iconized = nShowCmd == SW_MINIMIZE;
+    }
 }
 
 void wxTopLevelWindowMSW::ShowWithoutActivating()