]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
Native wxCheckListBox implementation for wxWinCE.
[wxWidgets.git] / src / msw / frame.cpp
index 73f53067bf19d677ef4bed3826ffe7b395f7f274..69248ea9d65533de07eec3788de80e9979f30c4c 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "frame.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -47,9 +43,9 @@
 #endif
 
 #if defined(__POCKETPC__) || defined(__SMARTPHONE__)
-#include "wx/msw/ole/oleutils.h"
-#include <aygshell.h>
-#include "wx/msw/winundef.h"
+    #include <ole2.h>
+    #include <aygshell.h>
+    #include "wx/msw/winundef.h"
 #endif
 
 #if wxUSE_STATUSBAR
@@ -211,14 +207,14 @@ bool wxFrame::Create(wxWindow *parent,
     SetLeftMenu(wxID_EXIT, _("Done"));
 #endif
 
-#if defined(__POCKETPC__)
+#if wxUSE_ACCEL && defined(__POCKETPC__)
     // The guidelines state that Ctrl+Q should quit the app.
     // Let's define an accelerator table to send wxID_EXIT.
     wxAcceleratorEntry entries[1];
     entries[0].Set(wxACCEL_CTRL,   'Q',         wxID_EXIT);
     wxAcceleratorTable accel(1, entries);
     SetAcceleratorTable(accel);
-#endif
+#endif // wxUSE_ACCEL && __POCKETPC__
 
     return true;
 }
@@ -522,8 +518,27 @@ bool wxFrame::ShowFullScreen(bool show, long style)
         }
 #endif // wxUSE_TOOLBAR
 
-        if ((m_fsStyle & wxFULLSCREEN_NOMENUBAR) && m_hMenu)
-            ::SetMenu(GetHwnd(), (HMENU)m_hMenu);
+        if (m_fsStyle & wxFULLSCREEN_NOMENUBAR)
+        {
+            WXHMENU menu = m_hMenu;
+
+#if wxUSE_MDI_ARCHITECTURE
+            wxMDIParentFrame *frame = wxDynamicCast(this, wxMDIParentFrame);
+            if (frame)
+            {
+                wxMDIChildFrame *child = frame->GetActiveChild();
+                if (child)
+                {
+                    menu = child->GetWinMenu();
+                }
+            }
+#endif // wxUSE_MDI_ARCHITECTURE
+
+            if (menu)
+            {
+                ::SetMenu(GetHwnd(), (HMENU)menu);
+            }
+        }
 
 #if wxUSE_STATUSBAR
         wxStatusBar *theStatusBar = GetStatusBar();
@@ -958,7 +973,7 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara
             SHACTIVATEINFO* info = (SHACTIVATEINFO*) m_activateInfo;
             if (info)
                 SHHandleWMActivate(GetHwnd(), wParam, lParam, info, FALSE);
-            
+
             // This implicitly sends a wxEVT_ACTIVATE_APP event
             if (wxTheApp)
                 wxTheApp->SetActive(wParam != 0, FindFocus());