TrackPopupMenu

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean TrackPopupMenu( SalWindowHandle hWnd,
SalString sMenuName,
SalNumber nFlags,
SalNumber nX,
SalNumber nY)

The TrackPopupMenu method does the same thing as SalTrackPopupMenu, with the difference that it also translates the menu, and adds standard items to the standard data source menus.

Parameters

Name Description
SalWindowHandle hWnd Handle (or name) of the top-level window that processes messages generated by the pop-up menu.
SalString sMenuName Name of a pop-up menu accessible to the message processor, e.g. a named menu defined by the message processor, or a global named menu.
SalNumber nFlags Specifies how the pop-up menu displays. You can combine any Sys.TPM_* flag values using the OR (|) operator.
SalNumber nX Position of the pop-up menu on the X axis. The value of this parameter is ignored if you set the Sys.TPM_CursorX flag in nFlags.
SalNumber nY Position of the pop-up menu on the Y axis. The value of this parameter is ignored if you set the Sys.TPM_CursorY flag in nFlags.

Returns

The return value is TRUE if the menu is successfully displayed, FALSE otherwise.

Comments

Applications should always use TrackPopupMenu instead of SalTrackPopupMenu.

The framework automatically handles popup menus for all prototype classes. To use a non-default menu, applications should override the ContextMenuNameGet method rather than use TrackPopupMenu directly.