Menu State

The MENU ADD statements provide for an ItemState& parameter. For popup menus, this may be either %MFS_ENABLED or %MFS_DISABLED. For menu items, the state may be one of %MFS_ENABLED, %MFS_DISABLED, %MFS_CHECKED, %MFS_UNCHECKED, or %MFS_GRAYED.

A DDT menu requires the parent DDT dialog to contain at least one child control for the menu to operate correctly. This control may be a BUTTON or LABEL, etc, and the control may be located out of the visible client area of the dialog if necessary.

The Dessert Menu

In addition to creating menus dynamically, DDT provides a rich set of additional menu functions to allow you to manipulate your menus at run-time. The following is a brief summary of these functions:

MENU DELETE | Delete (remove) a menu item from a menu, or a popup menu from a menu bar.
MENU DRAW BAR | Redraw the menu bar for a given menu. This must be used if a menu is changed at run-time, regardless of whether the menu is visible or not.
MENU GET STATE | Obtain the current state of a menu item (%MF_ENABLED, etc). If the menu item is a separator, the returned value will be %MF_SEPARATOR.
MENU GET TEXT | Retrieve the text for a given menu item.
MENU SET STATE | Set the current state of a menu item.
MENU SET TEXT | Change the text of a specific menu item, and can be used to change the command accelerator of the item.

For a more comprehensive list of menu statements and functions, See the Command Summary for DDT.

See Also

Menus

Menu Walkthrough

More on the Menu

Menu Example