]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
1. derive wxGTK wxRadioBox from wxRadioBoxBase now, as in all other ports
[wxWidgets.git] / src / msw / mdi.cpp
index dad11b4bcd85680438a95f81a504f2a342536141..b0ec95a99dc42256e66ed35cd3cf56afd0518841 100644 (file)
 // headers
 // ---------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "mdi.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -45,6 +41,7 @@
     #include "wx/log.h"
 #endif
 
+#include "wx/stockitem.h"
 #include "wx/mdi.h"
 #include "wx/msw/private.h"
 
@@ -792,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.
@@ -1401,9 +1408,8 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu)
                 continue;
             }
 
-            wxString strHelp(_("&Help"));
             wxString strBuf(buf);
-            if ( wxStripMenuCodes(strBuf) == wxStripMenuCodes(strHelp) )
+            if ( wxStripMenuCodes(strBuf) == wxGetStockLabel(wxID_HELP,false) )
             {
                 success = true;
                 ::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,