Allow selecting disabled menu items

svn path=/trunk/; revision=30515
This commit is contained in:
Thomas Bluemel 2007-11-17 02:24:50 +00:00
parent 232b9edcf0
commit f5e6721b33

View file

@ -2081,8 +2081,7 @@ MenuMoveSelection(HWND WndOwner, PROSMENUINFO MenuInfo, INT Offset)
} }
/* If this is a good candidate; */ /* If this is a good candidate; */
if (MenuGetRosMenuItemInfo(MenuInfo->Self, i, &ItemInfo) && if (MenuGetRosMenuItemInfo(MenuInfo->Self, i, &ItemInfo) &&
0 == (ItemInfo.fType & MF_SEPARATOR) && 0 == (ItemInfo.fType & MF_SEPARATOR))
0 == (ItemInfo.fState & (MFS_DISABLED | MFS_GRAYED)) )
{ {
MenuSelectItem(WndOwner, MenuInfo, i, TRUE, NULL); MenuSelectItem(WndOwner, MenuInfo, i, TRUE, NULL);
MenuCleanupRosMenuItemInfo(&ItemInfo); MenuCleanupRosMenuItemInfo(&ItemInfo);
@ -2638,11 +2637,11 @@ MenuMouseMove(MTRACKER *Mt, HMENU PtMenu, UINT Flags)
{ {
MenuInitRosMenuItemInfo(&ItemInfo); MenuInitRosMenuItemInfo(&ItemInfo);
if (MenuGetRosMenuItemInfo(MenuInfo.Self, Index, &ItemInfo) && if (MenuGetRosMenuItemInfo(MenuInfo.Self, Index, &ItemInfo) &&
!(ItemInfo.fType & MF_SEPARATOR) && !(ItemInfo.fType & MF_SEPARATOR))
!(ItemInfo.fState & (MFS_DISABLED | MFS_GRAYED)) )
{ {
MenuSwitchTracking(Mt, &MenuInfo, Index); MenuSwitchTracking(Mt, &MenuInfo, Index);
Mt->CurrentMenu = MenuShowSubPopup(Mt->OwnerWnd, &MenuInfo, FALSE, Flags); if (!(ItemInfo.fState & (MFS_DISABLED | MFS_GRAYED)))
Mt->CurrentMenu = MenuShowSubPopup(Mt->OwnerWnd, &MenuInfo, FALSE, Flags);
} }
MenuCleanupRosMenuItemInfo(&ItemInfo); MenuCleanupRosMenuItemInfo(&ItemInfo);
} }