]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
Added corrected Show() to wxPopupWindow
[wxWidgets.git] / src / msw / toplevel.cpp
index 5f357c1d7335e8e5a4454ddef4be2e21bc570de1..b12a323c5a1a5e4064f34097e715cea519323b1b 100644 (file)
@@ -141,7 +141,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
     WXDWORD msflags = wxWindow::MSWGetStyle
                       (
                         (style & ~wxBORDER_MASK) | wxBORDER_NONE, exflags
-                      ) & ~WS_CHILD;
+                      ) & ~WS_CHILD & ~WS_VISIBLE;
 
     // first select the kind of window being created
     //
@@ -732,9 +732,9 @@ bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
     HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
     if ( !hmenu )
     {
-        wxLogLastError(_T("GetSystemMenu"));
-
-        return FALSE;
+        // no system menu at all -- ok if we want to remove the close button
+        // anyhow, but bad if we want to show it
+        return !enable;
     }
 
     // enabling/disabling the close item from it also automatically