HiliteMenuItem function (winuser.h)
Adds or removes highlighting from an item in a menu bar.
Syntax
BOOL HiliteMenuItem(
[in] HWND hWnd,
[in] HMENU hMenu,
[in] UINT uIDHiliteItem,
[in] UINT uHilite
);
Parameters
[in] hWnd
Type: HWND
A handle to the window that contains the menu.
[in] hMenu
Type: HMENU
A handle to the menu bar that contains the item.
[in] uIDHiliteItem
Type: UINT
The menu item. This parameter is either 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.
[in] uHilite
Type: UINT
Controls the interpretation of the uItemHilite parameter and indicates whether the menu item is highlighted. This parameter must be a combination of either MF_BYCOMMAND or MF_BYPOSITION and MF_HILITE or MF_UNHILITE.
Return value
Type: BOOL
If the menu item is set to the specified highlight state, the return value is nonzero.
If the menu item is not set to the specified highlight state, the return value is zero.
Remarks
The MF_HILITE and MF_UNHILITE flags can be used only with the HiliteMenuItem function; they cannot be used with the ModifyMenu function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
See also
Conceptual
Reference