Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MENUITEMTEMPLATE

MENUITEMTEMPLATE structure

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.

ValueMeaning
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

Type: WCHAR[1]

The menu item.

Requirements

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

Reference
LoadMenuIndirect
MENUITEMTEMPLATEHEADER
Conceptual
Menus

 

 

Community Additions

ADD
Show:
© 2015 Microsoft