I am working in MFC VC++ Visual Studio 2010 professional edition.
I would like to disable/enable submenu icon .
I used the function named SetMenuItemBitmaps()
used for adding icon.
CMenu* pMenu1 = GetMenu();
CMenu* pSubMenu = pMenu1->GetSubMenu(1);
if(pSubMenu != NULL)
{
pSubMenu ->SetMenuItemBitmaps(ID_NEW, MF_BYCOMMAND, ConvertIconToBitmap(hIcon) , ConvertIconToBitmap(hIcon1));
}
I would like to display hIcon1
as disable icon image, when Submenu Item named ID_NEW
is disabled
and hIcon
for displaying icon when the Submenu Item named ID_NEW
is enabled.
But it is only loading the hIcon
only.