]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/framuniv.cpp
OS/2 update for wxUniv merge.
[wxWidgets.git] / src / univ / framuniv.cpp
index 392227d60f68a7a52e2640c12c9776fc2e7904f5..4ae3912a68946dc9357ef6cf2bffa62e49a75e7b 100644 (file)
@@ -68,19 +68,22 @@ wxFrame::wxFrame(wxWindow *parent,
 }
 
 // ----------------------------------------------------------------------------
-// geometry
+// menu support
 // ----------------------------------------------------------------------------
 
 void wxFrame::OnSize(wxSizeEvent& event)
 {
+#if wxUSE_MENUS
     PositionMenuBar();
+#endif // wxUSE_MENUS
 
     event.Skip();
 }
 
+#if wxUSE_MENUS
+
 void wxFrame::PositionMenuBar()
 {
-#if wxUSE_MENUS
     if ( m_frameMenuBar )
     {
         // the menubar is positioned above the client size, hence the negative
@@ -88,8 +91,8 @@ void wxFrame::PositionMenuBar()
         m_frameMenuBar->SetSize(0, -m_frameMenuBar->GetSize().y,
                                 GetClientSize().x, -1);
     }
-#endif // wxUSE_MENUS
 }
+#endif // wxUSE_MENUS
 
 wxPoint wxFrame::GetClientAreaOrigin() const
 {
@@ -105,3 +108,13 @@ wxPoint wxFrame::GetClientAreaOrigin() const
     return pt;
 }
 
+bool wxFrame::Enable( bool enable )
+{
+    if (!wxFrameNative::Enable(enable))
+       return FALSE;
+#ifdef __WXMICROWIN__
+    if (m_frameMenuBar)
+        m_frameMenuBar->Enable(enable);
+#endif
+    return TRUE;
+}