SetItemInfofunction
Changes information about a menu item.
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.
Syntax
FUNCTION SetItemInfo (BYVAL hMenu AS HMENU, BYVAL item AS UINT, BYVAL fByPositon AS BOOLEAN, BYVAL pmii AS MENUITEMINFOW PTR) AS BOOLEAN
FUNCTION SetItemInfo (BYVAL hMenu AS HMENU, BYVAL item AS UINT, BYVAL fByPositon AS BOOLEAN, BYREF mii AS MENUITEMINFOW) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
hMenu | A handle to a menu. | |
item | The identifier or position of the menu item to change. The meaning of this parameter depends on the value of fByPositon. | |
fByPosition | The meaning of item. If this parameter is FALSE, item is a menu item identifier. Otherwise, it is a menu item position, where position = 1 for the first position, position = 2 for the second, and so on. | |
pmii | A pointer to a MENUITEMINFOW structure that contains information about the menu item and specifies which menu item attributes to change. | |
mii | A MENUITEMINFOW structure that contains information about the menu item and specifies which menu item attributes to change. |
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, use the GetLastError function.
Description
Changes information about a menu item.
Remarks
The application must call the CMenu.DrawBar function whenever a menu changes, whether the menu is in a displayed window. SetItemInfo does this call internally.
In order for keyboard accelerators to work with bitmap or owner-drawn menu items, the owner of the menu must process the WM_MENUCHAR message.
Reference
- Documented in Windows/WIndows Controls/CMenu Class.md
- Topic: About Menus