Share via


MENUITEM Statement (Windows Embedded CE 6.0)

1/6/2010

This resource-definition statement creates a menu item.

MENUITEM text, result, [[optionlist]] MENUITEM SEPARATOR

Parameters

  • text
    String that indicates 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 menus, not in menu bars. The \a character aligns all text that follows it flush right to the menu bar or pop-up menu.

    For information about menus, see POPUP Resource.

  • result
    Specifies the result generated when the user selects the menu item. This parameter takes and returns an integer value. When the user selects the menu-item name, the result is sent to the window that owns the menu.
  • optionlist
    Specifies the appearance of the menu item. This optional parameter can be one or more of the following redefined menu options, separated by commas or spaces.

    Value Description

    CHECKED

    Menu item has a check mark next to it.

    GRAYED

    Menu item is initially inactive and appears on the menu in gray or a lightened shade of the menu text color. This option cannot be used with the INACTIVE option.

    INACTIVE

    Menu item is displayed but it cannot be selected. This option cannot be used with the GRAYED option.

    MENUBARBREAK

    This option is the same as MENUBREAK except that for pop-up menus, MENUBARBREAK separates the new column from the old column with a vertical line.

    MENUBREAK

    For static menu bar items, MENUBREAK places the menu item on a new line. For menus, MENUBREAK places the menu item in a new column with no dividing line between the columns.

  • MENUITEM SEPARATOR
    This implementation of the MENUITEM statement creates an inactive menu item that serves as a dividing bar between two active menu items on a menu.

Example

The following code example shows how to use the MENUITEM and MENUITEM SEPARATOR statements.

MENUITEM "&Roman", 206, CHECKED, GRAYED
MENUITEM SEPARATOR
MENUITEM "&Blackletter", 301 

See Also

Reference

MENU Statement
POPUP Resource

Concepts

Resource-Definition Statements