BOOL HiliteMenuItem(hwnd, hmenu, uItemHilite, uHilite) | |||||
HWND hwnd; | /* handle of window with menu | */ | |||
HMENU hmenu; | /* handle of menu | */ | |||
UINT uItemHilite; | /* menu-item to highlight or unhighlight | */ | |||
UINT uHilite; | /* highlight flags | */ |
The HiliteMenuItem function highlights or removes the highlighting from an item in a menu bar.
hwnd
Identifies the window that contains the menu.
hmenu
Identifies the menu bar that contains the item to be highlighted.
uItemHilite
Specifies the identifier of the menu item or the offset of the menu item in the menu bar, depending on the value of the uHilite parameter.
uHilite
Specifies flags that control the interpretation of the uItemHilite parameter and whether or the menu item is highlighted or not. This parameter can be a combination of either MF_BYCOMMAND or MF_BYPOSITION, and MF_HILITE or MF_UNHILITE.
Value | Meaning |
MF_BYCOMMAND | ||
The uItemHilite parameter specifies the identifier of the menu item. | ||
MF_BYPOSITION | ||
The uItemHilite parameter specifies the zero-based relative position of the menu item. | ||
MF_HILITE | ||
The menu item is highlighted. If this value is not given, the highlighting is removed from the item. | ||
MF_UNHILITE | ||
The highlighting is removed from the menu item. |
The return value is TRUE if the menu item is set to the specified highlight state. Otherwise, it is FALSE.
The MF_HILITE and MF_UNHILITE flags can be used only with the HiliteMenuItem function; they cannot be used with the ModifyMenu function.
ModifyMenu