Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspPopupConfigMenu

DspPopupConfigMenu

Displays the contents of a menu node as a pop-up (context) menu, and run the command associated with the selected menu item. You can specify the contents of a menu using the menu configuration dialog at design time, or using the Menu family of Cicode functions at runtime.

Syntax

DspPopupConfigMenu(hParent, [, bNonRecursive [, XPos [, YPos]]])

hParent

The parent node of the menu tree returned from any of the following functions:

bNonRecursive

Whether not to recursively transverse child tree nodes and list them as sub-menus in the pop-up menu. This parameter is optional. If it is left unspecified, its value will be defaulted to 0 (recursive). When it is set to 1, only the immediate child nodes of the specified menu handle will be listed. In this mode, tree nodes will be listed as normal menu items (instead of submenus) in the pop-up menu.

XPos

The x-coordinate (relative to the page) at which the menu will be displayed.This parameter is optional. If it is left unspecified, the menu will display at the cursor's current position.

YPos

The y-coordinate (relative to the page) at which the menu will be displayed.This parameter is optional. If it is left unspecified, the menu will display at the cursor's current position.

Return Value

0 if the selected meun command is run or error code if menu command cannot run.

Related Functions

Display Functions