BOOL HiliteMenuItem(hWnd,hMenu,wIDHiliteItem,wHilite)
This function highlights or removes the highlighting from a top-level (menu-bar) menu item.
Parameter | Type/Description |
hWnd | HWND Identifies the window that contains the menu. | ||
hMenu | HMENU Identifies the top-level menu that contains the item to be highlighted. | ||
wIDHiliteItem | WORD Specifies the integer identifier of the menu item or the offset of the menu item in the menu, depending on the value of the wHilite parameter. | ||
wHilite | WORD Specifies whether the menu item is highlighted or the highlight is removed. It can be a combination of MF_HILITE or MF_UNHILITE with MF_BYCOMMAND or MF_BYPOSITION. The values can be combined using the bitwise OR operator. These values have the following meanings: | ||
Value | Meaning | ||
MF_BYCOMMAND | Interprets wIDHiliteItem as the menu-item ID (the default interpretation). | ||
MF_BYPOSITION | Interprets wIDHiliteItem as an offset. | ||
MF_HILITE | Highlights the item. If this value is not given, highlighting is removed from the item. | ||
MF_UNHILITE | Removes highlighting from the item. |
The return value specifies whether or not the menu item is highlighted the outcome of the function. It is nonzero if the item is highlightedwas set to the specified highlight state. Otherwise, it is zero FALSE.
The MF_HILITE and MF_UNHILITE flags can be used only with the HiliteMenuItem function; they cannot be used with the ModifyMenu function.