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:
parent
5c2be659f9
commit
e6c3fa1bb0
@ -456,9 +456,12 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
|
|||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
bool ret wxDUMMY_INITIALIZE(false);
|
bool ret wxDUMMY_INITIALIZE(false);
|
||||||
|
int w, h;
|
||||||
|
|
||||||
// init our fields
|
// init our fields
|
||||||
Init();
|
Init();
|
||||||
|
w = WidthDefault(size.x);
|
||||||
|
h = HeightDefault(size.y);
|
||||||
|
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
|
|
||||||
@ -501,12 +504,12 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
|
|||||||
if ( style & (wxRESIZE_BORDER | wxCAPTION) )
|
if ( style & (wxRESIZE_BORDER | wxCAPTION) )
|
||||||
dlgTemplate->style |= DS_MODALFRAME;
|
dlgTemplate->style |= DS_MODALFRAME;
|
||||||
|
|
||||||
ret = CreateDialog(dlgTemplate, title, pos, size);
|
ret = CreateDialog(dlgTemplate, title, pos, wxSize(w,h));
|
||||||
free(dlgTemplate);
|
free(dlgTemplate);
|
||||||
}
|
}
|
||||||
else // !dialog
|
else // !dialog
|
||||||
{
|
{
|
||||||
ret = CreateFrame(title, pos, size);
|
ret = CreateFrame(title, pos, wxSize(w,h));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ret && !(GetWindowStyleFlag() & wxCLOSE_BOX) )
|
if ( ret && !(GetWindowStyleFlag() & wxCLOSE_BOX) )
|
||||||
|
Loading…
Reference in New Issue
Block a user