Menu |
The MenuItemInfo type exposes the following members.
Name | Description | |
---|---|---|
Equals | (Inherited from ValueType) | |
GetHashCode | (Inherited from ValueType) | |
GetType | (Inherited from Object) | |
ToString | (Inherited from ValueType) |
Name | Description | |
---|---|---|
CheckedBitmapHandle | A handle to the bitmap to display next to the item if it is selected. If this member is NULL, a default bitmap is used. If the MFT_RADIOCHECK type value is specified, the default bitmap is a bullet. Otherwise, it is a check mark. Set fMask to MIIM_CHECKMARKS to use hbmpChecked. | |
DisplayBitmapHandle | A handle to the bitmap to be displayed, or it can be one of the values in the following table. It is used when the MIIM_BITMAP flag is set in the fMask member. | |
Identifier | An application-defined value that identifies the menu item. Set fMask to MIIM_ID to use wID. | |
ItemData | An application-defined value associated with the menu item. Set fMask to MIIM_DATA to use dwItemData. | |
Mask | Indicates the members to be retrieved or set. | |
Size | The size of the structure, in bytes. The caller must set this member to sizeof(MENUITEMINFO). | |
State | The menu item state. This member can be one or more of these values. Set fMask to MIIM_STATE to use fState. | |
SubMenuHandle | A handle to the drop-down menu or submenu associated with the menu item. If the menu item is not an item that opens a drop-down menu or submenu, this member is NULL. Set fMask to MIIM_SUBMENU to use hSubMenu. | |
TextLength | The length of the menu item text, in characters, when information is received about a menu item of the MFT_STRING type. However, cch is used only if the MIIM_TYPE flag is set in the fMask member and is zero otherwise. Also, cch is ignored when the content of a menu item is set by calling SetMenuItemInfo. Note that, before calling GetMenuItemInfo, the application must set cch to the length of the buffer pointed to by the dwTypeData member.If the retrieved menu item is of type MFT_STRING (as indicated by the fType member), then GetMenuItemInfo changes cch to the length of the menu item text.If the retrieved menu item is of some other type, GetMenuItemInfo sets the cch field to zero. The cch member is used when the MIIM_STRING flag is set in the fMask member. | |
Type | The menu item type. This member can be one or more of the following values. | |
TypeData | The contents of the menu item. The meaning of this member depends on the value of fType and is used only if the MIIM_TYPE flag is set in the fMask member. To retrieve a menu item of type MFT_STRING, first find the size of the string by setting the dwTypeData member of MENUITEMINFO to NULL and then calling GetMenuItemInfo.The value of cch+1 is the size needed.Then allocate a buffer of this size, place the pointer to the buffer in dwTypeData, increment cch, and call GetMenuItemInfo once again to fill the buffer with the string. If the retrieved menu item is of some other type, then GetMenuItemInfo sets the dwTypeData member to a value whose type is specified by the fType member. When using with the SetMenuItemInfo function, this member should contain a value whose type is specified by the fType member. dwTypeData is used only if the MIIM_STRING flag is set in the fMask member | |
UncheckedBitmapHandle | A handle to the bitmap to display next to the item if it is not selected. If this member s NULL, no bitmap is used. Set fMask to MIIM_CHECKMARKS to use hbmpUnchecked. |