menuID MENU [load-option] [mem-option]
BEGIN
item-definitions
.
.
.
END
The MENU statement defines the contents of a menu resource. A menu resource is a collection of information that defines the appearance and function of an application menu. A menu is a special input tool that lets a user select commands from a list of command names.
menuID
Identifies the menu. This value is either a unique string or a unique integer value in the range of 1 to 65,535.
load-option
Specifies when the resource is to be loaded. This parameter is optional. If it is specified, it must be one of the following:
Option | Description |
PRELOAD | Resource is loaded immediately. |
LOADONCALL | Resource is loaded when called. This is the default option. |
mem-option
Specifies whether the resource is fixed or movable and whether it is discardable. This parameter is optional. If it is specified, it must be either FIXED or MOVEABLE. An additional value, DISCARDABLE, may also be specified. A description of the memory options follows:
Option | Description |
FIXED | Resource remains at a fixed memory location. |
MOVEABLE | Resource can be moved if necessary in order to compact memory. This is the default option. |
DISCARDABLE | Resource can be discarded if no longer needed. |
The default is MOVEABLE and DISCARDABLE.
Following is an example of a complete MENU statement:
sample MENU
BEGIN
MENUITEM "&Soup", 100
MENUITEM "S&alad", 101
POPUP "&Entree"
BEGIN
MENUITEM "&Fish", 200
MENUITEM "&Chicken", 201, CHECKED
POPUP "&Beef"
BEGIN
MENUITEM "&Steak", 301
MENUITEM "&Prime Rib", 302
END
END
MENUITEM "&Dessert", 103
END