SHOW-CONTEXT-MENU Action

This document covers the following topics:


Description

Manually invokes a context menu.

Note:
This is an alternative to the preferred automatic context menu invocation based on the use of the CONTEXT-MENU attribute.

For more information, please refer to the article Defining and Using Context Menus.

Parameters

Name/Data Type Explanation
HANDLE OF CONTEXTMENU Input

Handle of the CONTEXT-MENU.

HANDLE OF GUI Input (optional parameter)

The handle of the dialog or dialog element hosting the context menu, to which the (supplied or implicit) coordinates are relative. The context menu's CONTROL attribute will be set to this value. If not specified, the value of NULL-HANDLE is assumed, implying that the coordinates are screen-relative.

X-Position (I4) Input (optional parameter)

X-axis position at which the context menu is to be displayed, relative to the interior (client) area of the host dialog or dialog element, if any, or the screen position otherwise. If not specified, the value 0 is assumed.

Y-Position (I4) Input (optional parameter)

Y-axis position at which the context menu is to be displayed, relative to the interior (client) area of the host dialog or dialog element, if any, or the screen position otherwise. If not specified, the value 0 is assumed.

Response (I4) Output

Natural error (if applicable).

Example:

PROCESS GUI ACTION SHOW-CONTEXT-MENU WITH #CTXMENU-1 GIVING *ERROR