X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2973301f6fae5eed8a0f3ab93430da3f4806d2a8..81533a3af6ed598c32a35e1c1c2b60f4908f5541:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 3773984990..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); @@ -609,6 +612,14 @@ void wxTopLevelWindowMSW::DoShowWindow(int nShowCmd) m_iconized = nShowCmd == SW_MINIMIZE; } +void wxTopLevelWindowMSW::ShowWithoutActivating() +{ + if ( !wxWindowBase::Show(true) ) + return; + + DoShowWindow(SW_SHOWNA); +} + bool wxTopLevelWindowMSW::Show(bool show) { // don't use wxWindow version as we want to call DoShowWindow() ourselves