]> git.saurik.com Git - wxWidgets.git/commitdiff
implemented wxCLOSE_BOX under Windows
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 2 Mar 2003 18:58:58 +0000 (18:58 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 2 Mar 2003 18:58:58 +0000 (18:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index 96320bcfefb0ca79fd4081ac82b2685484ea23ba..7e827494bde7718f7d6e1dee771fbeef497052e7 100644 (file)
@@ -414,6 +414,8 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
                                  long style,
                                  const wxString& name)
 {
+    bool ret = false;
+
     // init our fields
     Init();
 
@@ -458,15 +460,20 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
         if ( style & (wxRESIZE_BORDER | wxCAPTION) )
             dlgTemplate->style |= DS_MODALFRAME;
 
-        bool ret = CreateDialog(dlgTemplate, title, pos, size);
+        ret = CreateDialog(dlgTemplate, title, pos, size);
         free(dlgTemplate);
-
-        return ret;
     }
     else // !dialog
     {
-        return CreateFrame(title, pos, size);
+        ret = CreateFrame(title, pos, size);
+    }
+
+    if ( ret && !(GetWindowStyleFlag() & wxCLOSE_BOX) )
+    {
+        EnableCloseButton(false);
     }
+
+    return ret;
 }
 
 wxTopLevelWindowMSW::~wxTopLevelWindowMSW()