MENU ADD POPUP statement

Purpose

Add a popup child menu to an existing menu.

Syntax

MENU ADD POPUP, hMenu, txt$, hPopup, state& [, AT [BYCMD] pos&]

Remarks

A popup menu is a small window that "pops up" when a menu item is highlighted. This allows nesting, and gives the user an opportunity to choose from "sub-menu" items.

hMenu 

Double-word or Long-integer variable containing the handle of the parent menu to which you are adding the popup child menu

txt$

Text displayed in the parent menu. An ampersand (&) may be used in the string to make the following letter into a control accelerator (hot-key). The letter appears underscored to signify that it is an accelerator.

hPopup 

Double-word or Long-integer containing the handle of the child popup menu you are adding to the parent menu.

state&

The initial state of the menu item. It can be one of the following:

%MF_DISABLED

Disable the item so that it cannot be selected.

%MF_ENABLED

Enable the item so that it can be selected.

pos&

Indicates the position in the parent menu where the popup child menu is to be inserted. If the BYCMD option is used, the popup menu is inserted prior to the menu item ID specified by pos&. Otherwise, the popup menu is inserted at the physical pos& within the parent menu, where pos& = 1 for the first position, pos& = 2 for the second, and so on.

See also

Dynamic Dialog Tools, ACCEL ATTACH, Menus, MENU ADD STRING, MENU ATTACH, MENU DELETE, MENU DRAW BAR, MENU GET STATE, MENU GET TEXT, MENU NEW BAR, MENU NEW POPUP, MENU SET STATE, MENU SET TEXT

Example

See Menu Example.