<<

Contents

Search

>>

 

START_MENU

 

 

Function

 

 

Syntax:

START_MENU([<Start Menu Item>[,<Handle>]])

 

<Start Menu Item>

= <STRING-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

The menu created by the functions ADD_MENU is started in the window <Handle>.

 

<Handle> specifies the window in which the menu is to be displayed. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing or invalid, the menu is displayed in the main window.

 

<Start Menu Item> specifies the menu point that is immediately called after the menu has been started. The menu text must be specified in the same way it was specified with ADD_MENU, that is including the character ‘&’ (if available).

 

The switch ENABLE / DISABLE MENU_WAIT controls when the function START_MENU is terminated: With ENABLE MENU_WAIT the function START_MENU is only terminated when the instruction ENDMENU is executed. With DISABLE MENU_WAIT the menu is started and the function START_MENU is immediately terminated with the result. The menu remains active until the instruction ENDMENU is executed.

 

If START_MENU is executed in a subprogram, the menu is automatically terminated when the subprogram is terminated.

 

If ENABLE  MENU_CLOSE is set and a menu item is called, the previously selected menu item is closed and all NOWAIT windows are closed down to the window depth of <Handle>.

 

START_MENU returns the following values:

 

0

 No error

-1

 Runtime error

6002

 Double call of START_MENU

6008

 The menu is empty.

 

Parameter:

Start Menu Item

Menue item which is called immediately after the menu has started.

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

 

Sample:

H% = START_MENU("&Open")

 

See also:

ADD_MENU

DEL_MENU

ENDMENU

START_POPUPMENU

EBUS_REOPEN_MENU