X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5d85ef0321a8eeb65288ab2b5bc1ef439a5badf..d9edff064d1443d15937ca429917527483f46a31:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 33d7dbd6e2..93984343d1 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -118,7 +118,9 @@ UINT GetMenuState(HMENU hMenu, UINT id, UINT flags) info.fMask = MIIM_STATE; // MF_BYCOMMAND is zero so test MF_BYPOSITION if ( !::GetMenuItemInfo(hMenu, id, flags & MF_BYPOSITION ? TRUE : FALSE , & info) ) + { wxLogLastError(wxT("GetMenuItemInfo")); + } return info.fState; } #endif // __WXWINCE__ @@ -397,7 +399,7 @@ HBITMAP GetHBitmapForMenu(wxMenuItem *pItem, bool checked = true) pItem->SetBitmap(img, checked); } - return GetHbitmapOf(pItem->GetBitmap()); + return GetHbitmapOf(pItem->GetBitmap(checked)); } } #endif // wxUSE_IMAGE @@ -562,14 +564,16 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) // the app from starting up under Windows 95/NT 4 typedef BOOL (WINAPI *SetMenuInfo_t)(HMENU, MENUINFO *); - wxDynamicLibrary dllUser(_T("user32")); + wxDynamicLibrary dllUser(wxT("user32")); wxDYNLIB_FUNCTION(SetMenuInfo_t, SetMenuInfo, dllUser); if ( pfnSetMenuInfo ) { mi.fMask = MIM_STYLE; mi.dwStyle = MNS_CHECKORBMP; if ( !(*pfnSetMenuInfo)(GetHmenu(), &mi) ) - wxLogLastError(_T("SetMenuInfo(MNS_NOCHECK)")); + { + wxLogLastError(wxT("SetMenuInfo(MNS_NOCHECK)")); + } } // tell the item that it's not really owner-drawn but only @@ -635,7 +639,7 @@ void wxMenu::EndRadioGroup() wxMenuItem* wxMenu::DoAppend(wxMenuItem *item) { - wxCHECK_MSG( item, NULL, _T("NULL item in wxMenu::DoAppend") ); + wxCHECK_MSG( item, NULL, wxT("NULL item in wxMenu::DoAppend") ); bool check = false; @@ -667,7 +671,7 @@ wxMenuItem* wxMenu::DoAppend(wxMenuItem *item) } else { - wxFAIL_MSG( _T("where is the radio group start item?") ); + wxFAIL_MSG( wxT("where is the radio group start item?") ); } } } @@ -1446,9 +1450,13 @@ bool wxMenuBar::AddAdornments(long style) if (style & wxCLOSE_BOX) { if (!CommandBar_AddAdornments((HWND) m_commandBar, 0, 0)) + { wxLogLastError(wxT("CommandBar_AddAdornments")); + } else + { return true; + } } return false; }