X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbc7ceb9250bcc2f856f87555f8f4273da31c148..d141826876edc1e7dd5bf18d050cea8754a3f718:/src/msw/toplevel.cpp?ds=inline diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index e74256523c..d5b115495e 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -482,12 +482,15 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, sizeReal.SetDefaults(GetDefaultSize()); } + // notice that we should append this window to wxTopLevelWindows list + // before calling CreateBase() as it behaves differently for TLW and + // non-TLW windows + wxTopLevelWindows.Append(this); + bool ret = CreateBase(parent, id, pos, sizeReal, style, name); if ( !ret ) return false; - wxTopLevelWindows.Append(this); - if ( parent ) parent->AddChild(this); @@ -612,7 +615,7 @@ void wxTopLevelWindowMSW::DoShowWindow(int nShowCmd) void wxTopLevelWindowMSW::ShowWithoutActivating() { if ( !wxWindowBase::Show(true) ) - return false; + return; DoShowWindow(SW_SHOWNA); }