MENUITEMTEMPLATE structure (winuser.h)

Defines a menu item in a menu template.

Syntax

typedef struct {
  WORD  mtOption;
  WORD  mtID;
  WCHAR mtString[1];
} MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;

Members

mtOption

Type: WORD

One or more of the following predefined menu options that control the appearance of the menu item as shown in the following table.

Value Meaning
MF_CHECKED
0x00000008L
Indicates that the menu item has a check mark next to it.
MF_GRAYED
0x00000001L
Indicates that the menu item is initially inactive and drawn with a gray effect.
MF_HELP
0x00004000L
Indicates that the menu item has a vertical separator to its left.
MF_MENUBARBREAK
0x00000020L
Indicates that the menu item is placed in a new column. The old and new columns are separated by a bar.
MF_MENUBREAK
0x00000040L
Indicates that the menu item is placed in a new column.
MF_OWNERDRAW
0x00000100L
Indicates that the owner window of the menu is responsible for drawing all visual aspects of the menu item, including highlighted, selected, and inactive states. This option is not valid for an item in a menu bar.
MF_POPUP
0x00000010L
Indicates that the item is one that opens a drop-down menu or submenu.

mtID

Type: WORD

The menu item identifier of a command item; a command item sends a command message to its owner window. The MENUITEMTEMPLATE structure for an item that opens a drop-down menu or submenu does not contain the mtID member.

mtString[1]

Type: WCHAR[1]

The menu item.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header winuser.h (include Windows.h)

See also

Conceptual

LoadMenuIndirect

MENUITEMTEMPLATEHEADER

Menus

Reference