]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menu.cpp
[ 1509599 ] 'Split pickers page in widgets sample' with more icons and rebaking.
[wxWidgets.git] / src / msw / menu.cpp
index 85d93d73a9cd76c317a87463394a7907c03bb667..cdec3e7a1c61fd6e68757071693e2a25215e3b38 100644 (file)
 
 #if wxUSE_MENUS
 
+#include "wx/menu.h"
+
 #ifndef WX_PRECOMP
     #include "wx/frame.h"
-    #include "wx/menu.h"
     #include "wx/utils.h"
     #include "wx/intl.h"
     #include "wx/log.h"
 
 #include "wx/msw/private.h"
 
+// include <commctrl.h> "properly"
+#include "wx/msw/wrapcctl.h"
+
 #ifdef __WXWINCE__
 #include <windows.h>
 #include <windowsx.h>
 #include <tchar.h>
 #include <ole2.h>
 #include <shellapi.h>
-#include <commctrl.h>
 #if (_WIN32_WCE < 400) && !defined(__HANDHELDPC__)
 #include <aygshell.h>
 #endif
@@ -874,7 +877,9 @@ WXHMENU wxMenuBar::Create()
 
     HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
     HMENU hMenu = (HMENU)::SendMessage(hCommandBar, SHCMBM_GETMENU, (WPARAM)0, (LPARAM)0);
-    if (hMenu)
+
+    // hMenu may be zero on Windows Mobile 5. So add the menus anyway.
+    if (1) // (hMenu)
     {
         TBBUTTON tbButton;
         memset(&tbButton, 0, sizeof(TBBUTTON));