]> git.saurik.com Git - wxWidgets.git/commitdiff
Use the WidthDefault and HeightDefault in wxTLW, not wxWindow
authorRobin Dunn <robin@alldunn.com>
Sat, 13 Mar 2004 21:35:58 +0000 (21:35 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 13 Mar 2004 21:35:58 +0000 (21:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index f20ea0752443e3dacf1a566f0c34b1d56e69cd4b..9ac4d707b2809badecbfa88ecd463ea3ccc04769 100644 (file)
@@ -456,9 +456,12 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
                                  const wxString& name)
 {
     bool ret wxDUMMY_INITIALIZE(false);
-
+    int w, h;
+    
     // init our fields
     Init();
+    w = WidthDefault(size.x);
+    h = HeightDefault(size.y);
 
     m_windowStyle = style;
 
@@ -501,12 +504,12 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
         if ( style & (wxRESIZE_BORDER | wxCAPTION) )
             dlgTemplate->style |= DS_MODALFRAME;
 
-        ret = CreateDialog(dlgTemplate, title, pos, size);
+        ret = CreateDialog(dlgTemplate, title, pos, wxSize(w,h));
         free(dlgTemplate);
     }
     else // !dialog
     {
-        ret = CreateFrame(title, pos, size);
+        ret = CreateFrame(title, pos, wxSize(w,h));
     }
 
     if ( ret && !(GetWindowStyleFlag() & wxCLOSE_BOX) )