BOOL HiliteMenuItem(hwnd, hmenu, idHiliteItem, fuHilite) | |||||
HWND hwnd; | /* handle of window with menu | */ | |||
HMENU hmenu; | /* handle of menu, */ | ||||
UINT idHiliteItem; | /* menu-item identifier, */ | ||||
UINT fuHilite; | /* highlight flags, */ |
The HiliteMenuItem function highlights or removes the highlighting from a top-level (menu-bar) menu item.
hwnd
Identifies the window that contains the menu.
hmenu
Identifies the top-level menu that contains the item to be highlighted.
idHiliteItem
Specifies the menu item to be highlighted, as determined by the fuHilite parameter.
fuHilite
Specifies whether the menu item is highlighted or the highlight is removed. It can be a combination of the MF_HILITE or MF_UNHILITE value with the MF_BYCOMMAND or MF_BYPOSITION value. These values have the following meanings:
Value | Meaning |
MF_BYCOMMAND | Menu-item identifier is specified by the idHiliteItem parameter (the default interpretation). |
MF_BYPOSITION | Zero-based position of the menu item is specified by the idHiliteItem parameter. |
MF_HILITE | Menu item is highlighted. If this value is not given, highlighting is removed from the menu item. |
MF_UNHILITE | Highlighting is removed from the menu item. |
The return value is nonzero if the function is successful. Otherwise, it is zero.
The MF_HILITE and MF_UNHILITE flags can be used only with the HiliteMenuItem function; they cannot be used with the ModifyMenu function.