From 6fa30495b51914b29ca50323d71703cd1c6fb87e Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Sun, 13 Nov 2005 05:00:32 +0000 Subject: [PATCH] Fix MDI child windows not becoming active when created after changes to wxTopLevelWindow; BringWindowToTop added to wxMDIChildFrame git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/mdi.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index fa13c1c64e..b0ec95a99d 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -789,7 +789,17 @@ wxMDIChildFrame::~wxMDIChildFrame() bool wxMDIChildFrame::Show(bool show) { m_needsInitialShow = false; - return wxFrame::Show(show); + + if (!wxFrame::Show(show)) + return false; + + // KH: Without this call, new MDI children do not become active. + // This was added here after the same BringWindowToTop call was + // removed from wxTopLevelWindow::Show (November 2005) + if ( show ) + ::BringWindowToTop(GetHwnd()); + + return true; } // Set the client size (i.e. leave the calculation of borders etc. -- 2.47.2