X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/335b5afa775c6d96f18ff6649386d3d90f322a8a..9914bfbb77f48baf869b63aff58feb2b145ff4d3:/src/msw/toplevel.cpp?ds=inline diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 5fb5fd504f..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);