X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e02be855d14263c996448bdb56c9e1002ad9b53..669c595dafb825d27fda99fcde39ad2fc88e0db3:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 738d07c711..cdec3e7a1c 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -26,9 +26,10 @@ #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" @@ -40,13 +41,15 @@ #include "wx/msw/private.h" +// include "properly" +#include "wx/msw/wrapcctl.h" + #ifdef __WXWINCE__ #include #include #include #include #include -#include #if (_WIN32_WCE < 400) && !defined(__HANDHELDPC__) #include #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)); @@ -1133,6 +1138,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,