X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d4875664f6242d1580db047173d3075b047435e..b081046a6646bba07fb953adb06ebfe8ffffc3f7:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 7071a640da..1923ba92f2 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -93,6 +93,9 @@ static void SetDefaultMenuItem(HMENU hmenu, UINT id) { wxLogLastError(wxT("SetMenuItemInfo")); } +#else + wxUnusedVar(hmenu); + wxUnusedVar(id); #endif } @@ -135,7 +138,7 @@ template<> void wxCollectionToVariantArray( wxMenuItemList const &theList, wxxVa } wxBEGIN_PROPERTIES_TABLE(wxMenu) - wxEVENT_PROPERTY( Select , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) + wxEVENT_PROPERTY( Select , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) wxPROPERTY( Title, wxString , SetTitle, GetTitle, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxREADONLY_PROPERTY_FLAGS( MenuStyle , wxMenuStyle , long , GetStyle , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxPROPERTY_COLLECTION( MenuItems , wxMenuItemList , wxMenuItem* , Append , GetMenuItems , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) @@ -744,12 +747,12 @@ void wxMenuBar::Refresh() { wxCHECK_RET( IsAttached(), wxT("can't refresh unattached menubar") ); -#if defined(WINCE_WITH_COMMANDBAR) +#if defined(WINCE_WITHOUT_COMMANDBAR) if (GetToolBar()) { CommandBar_DrawMenuBar((HWND) GetToolBar()->GetHWND(), 0); } -#elif defined(WINCE_WITHOUT_COMMANDBAR) +#elif defined(WINCE_WITH_COMMANDBAR) if (m_commandBar) DrawMenuBar((HWND) m_commandBar); #else @@ -1171,24 +1174,9 @@ void wxMenuBar::Attach(wxFrame *frame) { wxMenuBarBase::Attach(frame); -#if defined(__WXWINCE__) +#if defined(WINCE_WITH_COMMANDBAR) if (!m_hMenu) this->Create(); -#if defined(WINCE_WITHOUT_COMMANDAR) - - // No idea why this was here, but it seems to be obsolete. - // Remove after testing with other WinCE combinations - April 2004 -#if 0 - if (GetToolBar()) - { - HWND hCommandBar = (HWND) GetToolBar()->GetHWND(); - if (!CommandBar_InsertMenubarEx(hCommandBar, NULL, (LPTSTR) m_hMenu, 0)) - { - wxLogLastError(wxT("CommandBar_InsertMenubarEx")); - } - } -#endif -#else if (!m_commandBar) m_commandBar = (WXHWND) CommandBar_Create(wxGetInstance(), (HWND) frame->GetHWND(), NewControlId()); if (m_commandBar) @@ -1202,16 +1190,13 @@ void wxMenuBar::Attach(wxFrame *frame) } } #endif - // PSPC/WFSP -#endif - // __WXWINCE__ && _WIN32_WCE >= 400 #if wxUSE_ACCEL RebuildAccelTable(); #endif // wxUSE_ACCEL } -#if defined(WINCE_WITH_COMMANDAR) +#if defined(WINCE_WITH_COMMANDBAR) bool wxMenuBar::AddAdornments(long style) { if (m_adornmentsAdded || !m_commandBar)