Click or drag to resize
Xcalibur Systems LLC Logo

MenuItemInfo Structure

Contains information about a menu item.

MENUITEMINFO structure

Inheritance Hierarchy
SystemObject
  SystemValueType
    Xcalibur.NativeMethods.V2.MenusMenuItemInfo

Namespace: Xcalibur.NativeMethods.V2.Menus
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
public struct MenuItemInfo

The MenuItemInfo type exposes the following members.

Methods
 NameDescription
Public methodEquals
(Inherited from ValueType)
Public methodGetHashCode
(Inherited from ValueType)
Public methodGetType
(Inherited from Object)
Public methodToString
(Inherited from ValueType)
Top
Fields
 NameDescription
Public fieldCheckedBitmapHandle 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.
Public fieldDisplayBitmapHandle 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.
Public fieldIdentifier An application-defined value that identifies the menu item. Set fMask to MIIM_ID to use wID.
Public fieldItemData An application-defined value associated with the menu item. Set fMask to MIIM_DATA to use dwItemData.
Public fieldMask Indicates the members to be retrieved or set.
Public fieldSize The size of the structure, in bytes. The caller must set this member to sizeof(MENUITEMINFO).
Public fieldState The menu item state. This member can be one or more of these values. Set fMask to MIIM_STATE to use fState.
Public fieldSubMenuHandle 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.
Public fieldTextLength 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.
Public fieldType The menu item type. This member can be one or more of the following values.
Public fieldTypeData 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
Public fieldUncheckedBitmapHandle 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.
Top
See Also