]> git.saurik.com Git - wxWidgets.git/commitdiff
Add menus even if we have no menubar HMENU (Windows Mobile 5.0 can't retrieve it).
authorJulian Smart <julian@anthemion.co.uk>
Wed, 15 Mar 2006 09:55:55 +0000 (09:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 15 Mar 2006 09:55:55 +0000 (09:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/menu.cpp

index 85d93d73a9cd76c317a87463394a7907c03bb667..cd13e775123433934dd00702ce6b9bd067258713 100644 (file)
@@ -874,7 +874,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));