]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
Compilation fir for VC6 after r73124.
[wxWidgets.git] / src / msw / toplevel.cpp
index e43e038530a4e3ff7cce81aa77301bde498235bb..0d1a0735cdde9113e08dff1284c3b12b08a22715 100644 (file)
@@ -709,9 +709,21 @@ bool wxTopLevelWindowMSW::Show(bool show)
         }
         else if ( m_iconized )
         {
         }
         else if ( m_iconized )
         {
-            // iconize and show
+            // We were iconized while we were hidden, so now we need to show
+            // the window in iconized state.
             nShowCmd = SW_MINIMIZE;
         }
             nShowCmd = SW_MINIMIZE;
         }
+        else if ( ::IsIconic(GetHwnd()) )
+        {
+            // We were restored while we were hidden, so now we need to show
+            // the window in its normal state.
+            //
+            // As below, don't activate some kinds of windows.
+            if ( HasFlag(wxFRAME_TOOL_WINDOW) || !IsEnabled() )
+                nShowCmd = SW_SHOWNOACTIVATE;
+            else
+                nShowCmd = SW_RESTORE;
+        }
         else // just show
         {
             // we shouldn't use SW_SHOW which also activates the window for
         else // just show
         {
             // we shouldn't use SW_SHOW which also activates the window for
@@ -823,9 +835,9 @@ void wxTopLevelWindowMSW::Iconize(bool iconize)
     }
     else // hidden
     {
     }
     else // hidden
     {
-        // iconizing the window shouldn't show it so just remember that we need
-        // to become iconized when shown later
-        m_iconized = true;
+        // iconizing the window shouldn't show it so just update the internal
+        // state (otherwise it's done by DoShowWindow() itself)
+        m_iconized = iconize;
     }
 }
 
     }
 }