From: Robin Dunn Date: Sat, 13 Mar 2004 21:35:58 +0000 (+0000) Subject: Use the WidthDefault and HeightDefault in wxTLW, not wxWindow X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e6c3fa1bb0579e19792f58abfa13102c37813131 Use the WidthDefault and HeightDefault in wxTLW, not wxWindow git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index f20ea07524..9ac4d707b2 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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) )