X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e02be855d14263c996448bdb56c9e1002ad9b53..63b3dc58be6a03cd617668f3a1a97cbfb3f95438:/src/msw/menu.cpp?ds=sidebyside diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 738d07c711..cd13e77512 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -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)); @@ -1133,6 +1135,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) wxLogLastError(wxT("TB_INSERTBUTTON")); return false; } + wxUnusedVar(mswpos); #else if ( !::InsertMenu(GetHmenu(), mswpos, MF_BYPOSITION | MF_POPUP | MF_STRING,