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
This commit is contained in:
Robin Dunn 2004-03-13 21:35:58 +00:00
parent 5c2be659f9
commit e6c3fa1bb0

View 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) )