X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a7c125370cf6fd2b66eb06ba031efcfd5c5b9b0..7fa4dc1cfcc55b0fe425a3ebe5e992ff8255481b:/src/os2/menu.cpp?ds=sidebyside diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index 09b8119900..a834dd5e85 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -202,7 +202,7 @@ void wxMenu::UpdateAccel( // size_t n = FindAccel(pItem->GetId()); - if (n == wxNOT_FOUND) + if (n == (size_t)wxNOT_FOUND) { // // No old, add new if any @@ -226,7 +226,7 @@ void wxMenu::UpdateAccel( if (IsAttached()) { - m_menuBar->RebuildAccelTable(); + GetMenuBar()->RebuildAccelTable(); } } } // wxMenu::UpdateAccel @@ -247,7 +247,6 @@ bool wxMenu::DoInsertOrAppend( ERRORID vError; wxString sError; - char zMsg[128]; #if wxUSE_ACCEL UpdateAccel(pItem); @@ -331,7 +330,6 @@ bool wxMenu::DoInsertOrAppend( #if wxUSE_OWNER_DRAWN if (pItem->IsOwnerDrawn()) { - BOOL rc; MENUITEM vMenuItem; ::WinSendMsg( GetHmenu() @@ -343,7 +341,7 @@ bool wxMenu::DoInsertOrAppend( ); } #endif - if (rc == MIT_MEMERROR || rc == MIT_ERROR) + if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError); @@ -356,9 +354,9 @@ bool wxMenu::DoInsertOrAppend( // // If we're already attached to the menubar, we must update it // - if (IsAttached() && m_menuBar->IsAttached()) + if (IsAttached() && GetMenuBar()->IsAttached()) { - m_menuBar->Refresh(); + GetMenuBar()->Refresh(); } return TRUE; } @@ -499,12 +497,12 @@ wxMenuItem* wxMenu::DoRemove( ,MPFROM2SHORT(pItem->GetId(), TRUE) ,(MPARAM)0 ); - if (IsAttached() && m_menuBar->IsAttached()) + if (IsAttached() && GetMenuBar()->IsAttached()) { // // Otherwise, the chane won't be visible // - m_menuBar->Refresh(); + GetMenuBar()->Refresh(); } // @@ -601,7 +599,7 @@ bool wxMenu::OS2Command( SendEvent( vId ,(int)::WinSendMsg( GetHmenu() ,MM_QUERYITEMATTR - ,(MPARAM)vId + ,MPFROMSHORT(vId) ,(MPARAM)MIA_CHECKED ) ); @@ -617,8 +615,8 @@ wxWindow* wxMenu::GetWindow() const { if (m_invokingWindow != NULL) return m_invokingWindow; - else if ( m_menuBar != NULL) - return m_menuBar->GetFrame(); + else if ( GetMenuBar() != NULL) + return GetMenuBar()->GetFrame(); return NULL; } // end of wxMenu::GetWindow @@ -730,7 +728,6 @@ void wxMenuBar::Refresh() WXHMENU wxMenuBar::Create() { - MENUITEM vItem; HWND hFrame; if (m_hMenu != 0 ) @@ -799,7 +796,7 @@ WXHMENU wxMenuBar::Create() m_menus[i]->m_vMenuData.iPosition = i; rc = (APIRET)::WinSendMsg(m_hMenu, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str()); - if (rc == MIT_MEMERROR || rc == MIT_ERROR) + if (rc == (APIRET)MIT_MEMERROR || rc == (APIRET)MIT_ERROR) { vError = ::WinGetLastError(vHabmain); sError = wxPMErrorToStr(vError);