MENUITEMtext, result[[,optionlist]]
This optional statement defines a menu item.
The text field takes an ASCII string, enclosed in double quotation marks, that specifies the name of the menu item.
The string can contain the escape characters \t and \a. The \t character inserts a tab in the string and is used to align text in columns. Tab characters should be used only in pop-up menus, not in menu bars. (See the following section for information on pop-up menus.) The \a character aligns all text that follows it flush right to the menu bar or pop-up menu.
To insert a double quotation mark (") in the string, use two double quotation marks ("").
To add a mnemonic to the text string, place an ampersand (&) ahead of the letter that will be the mnemonic. This will cause the letter to appear underlined in the control and to function as the mnemonic. To use an ampersand as a character in a string, insert two ampersands (&&).
The result field takes an integer value that specifies the result generated when the user selects the menu item. Menu-item results are always integers; when the user clicks the menu-item name, the result is sent to the window that owns the menu.
The optional optionlist field takes one or more predefined menu options, separated by commas or spaces, that specify the appearance of the menu item. The menu options are as follows:
CHECKED
Item has a check mark next to it.
GRAYED
Item name is initially unavailable and appears on the menu in gray or a lightened shade of the menu-text color.
HELP
Item has a vertical separator to its left.
INACTIVE
Item name is displayed, but it cannot be selected.
MENUBARBREAK
Same as MF_MENUBREAK except in pop-up menus, where it separates the new column from the old column with a vertical line.
MENUBREAK
Static menu-bar items
Item is placed on a new line.
Pop-up menu items
Item is placed in a new column, with no dividing line between columns.
The INACTIVE and GRAYED options cannot be used together.
The following example demonstrates the correct usage of the MENUITEM statement:
MENUITEM “&Alpha”, 1, CHECKED, GRAYED
MENUITEM “&Beta”, 2