]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
WXUNUSED_UNLESS_ODRAWN does not reflect wxUSE_MENUS_NATIVE.
[wxWidgets.git] / src / msw / mdi.cpp
index b1d924d27dacc1598cb24b205c654f053f658c8e..4bbb0a2b560ddb44910e41ec62500e7f7f54e2f2 100644 (file)
@@ -300,6 +300,34 @@ void wxMDIParentFrame::SetWindowMenu(wxMenu* menu)
     }
 }
 
+void wxMDIParentFrame::DoMenuUpdates(wxMenu* menu)
+{
+    wxMDIChildFrame *child = GetActiveChild();
+    if ( child )
+    {
+        wxEvtHandler* source = child->GetEventHandler();
+        wxMenuBar* bar = child->GetMenuBar();
+
+        if (menu)
+        {
+            menu->UpdateUI(source);
+        }
+        else
+        {
+            if ( bar != NULL )
+            {
+                int nCount = bar->GetMenuCount();
+                for (int n = 0; n < nCount; n++)
+                bar->GetMenu(n)->UpdateUI(source);
+            }
+        }
+    }
+    else
+    {
+        wxFrameBase::DoMenuUpdates(menu);
+    }
+}
+
 void wxMDIParentFrame::OnSize(wxSizeEvent&)
 {
     if ( GetClientWindow() )