X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6c3fa1bb0579e19792f58abfa13102c37813131..785f5eaa05195f5e44a974861864324667a3326e:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 9ac4d707b2..0296aac6ce 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -139,9 +139,6 @@ void wxTopLevelWindowMSW::Init() m_iconized = m_maximizeOnShow = FALSE; - // unlike (almost?) all other windows, frames are created hidden - m_isShown = FALSE; - // Data to save/restore when calling ShowFullScreen m_fsStyle = 0; m_fsOldWindowStyle = 0; @@ -225,7 +222,6 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const if ( exflags ) { -#if !defined(__WIN16__) if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) ) { if ( style & wxFRAME_TOOL_WINDOW ) @@ -258,7 +254,6 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const #endif //else: nothing to do [here] } -#endif // !Win16 if ( style & wxSTAY_ON_TOP ) *exflags |= WS_EX_TOPMOST; @@ -392,25 +387,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate, // move the dialog to its initial position without forcing repainting int x, y, w, h; - if ( !MSWGetCreateWindowCoords(pos, size, x, y, w, h) ) - { - x = - w = (int)CW_USEDEFAULT; - } - - // we can't use CW_USEDEFAULT here as we're not calling CreateWindow() - // and passing CW_USEDEFAULT to MoveWindow() results in resizing the - // window to (0, 0) size which breaks quite a lot of things, e.g. the - // sizer calculation in wxSizer::Fit() - if ( w == (int)CW_USEDEFAULT ) - { - // the exact number doesn't matter, the dialog will be resized - // again soon anyhow but it should be big enough to allow - // calculation relying on "totalSize - clientSize > 0" work, i.e. - // at least greater than the title bar height - w = - h = 100; - } + (void)MSWGetCreateWindowCoords(pos, size, x, y, w, h); if ( x == (int)CW_USEDEFAULT ) {