Default Menu Item
-
I have the following code to set one of the menu items as a default one (it should go bold), however the menu item is not displayed bold for some reason:
MENUITEMINFO menuItemInfo; menuItemInfo.cbSize = sizeof(MENUITEMINFO); menuItemInfo.fMask = MIIM_STATE; VERIFY(pSubMenu->GetMenuItemInfo(IDC_SHOWWINDOW,&menuItemInfo)); menuItemInfo.fMask = MIIM_STATE; menuItemInfo.fType = MFS_ENABLED|MFS_DEFAULT; VERIFY(pSubMenu->SetMenuItemInfo(IDC_SHOWWINDOW,&menuItemInfo));
Both GetMenuItemInfo() and SetMenuItemInfo() are successful as they return 1, but I cannot figure out why it doesn't display the menu item as bold. Any help would be greatly appreciated Thanks -
I have the following code to set one of the menu items as a default one (it should go bold), however the menu item is not displayed bold for some reason:
MENUITEMINFO menuItemInfo; menuItemInfo.cbSize = sizeof(MENUITEMINFO); menuItemInfo.fMask = MIIM_STATE; VERIFY(pSubMenu->GetMenuItemInfo(IDC_SHOWWINDOW,&menuItemInfo)); menuItemInfo.fMask = MIIM_STATE; menuItemInfo.fType = MFS_ENABLED|MFS_DEFAULT; VERIFY(pSubMenu->SetMenuItemInfo(IDC_SHOWWINDOW,&menuItemInfo));
Both GetMenuItemInfo() and SetMenuItemInfo() are successful as they return 1, but I cannot figure out why it doesn't display the menu item as bold. Any help would be greatly appreciated Thanks -
Try to change menuItemInfo.fType = MFS_ENABLED|MFS_DEFAULT; // Type has MFT_ with fState = MFS_ENABLED|MFS_DEFAULT;
I have tried that but for some reason it does not seem to work, that is why I asked the question in the 1st place. Thanks
-
I have tried that but for some reason it does not seem to work, that is why I asked the question in the 1st place. Thanks