Clean up GetHBitmapForMenu.
Merge wxMenuItem::GetHBitmapForMenuCheckable and ::DoGetHBitmapForMenu into wxMenuItem::GetHBitmapForMenu. Change its boolean parameter to an enum specifying the kind of bitmap that is wanted (normal, checked, or unchecked). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -573,13 +573,13 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||
if ( pItem->IsCheckable() )
|
||||
{
|
||||
mii.fMask |= MIIM_CHECKMARKS;
|
||||
mii.hbmpChecked = pItem->GetHBitmapForMenuCheckable(true);
|
||||
mii.hbmpUnchecked = pItem->GetHBitmapForMenuCheckable(false);
|
||||
mii.hbmpChecked = pItem->GetHBitmapForMenu(wxMenuItem::Checked);
|
||||
mii.hbmpUnchecked = pItem->GetHBitmapForMenu(wxMenuItem::Unchecked);
|
||||
}
|
||||
else if ( pItem->GetBitmap().IsOk() )
|
||||
{
|
||||
mii.fMask |= MIIM_BITMAP;
|
||||
mii.hbmpItem = pItem->GetHBitmapForMenu();
|
||||
mii.hbmpItem = pItem->GetHBitmapForMenu(wxMenuItem::Normal);
|
||||
}
|
||||
|
||||
mii.cch = itemText.length();
|
||||
|
||||
Reference in New Issue
Block a user