Cicode Programming Reference > Cicode Function Categories > Menu Functions > MenuNodeGetCurr

MenuNodeGetCurr

Each menu node can have a Command associated with it when a menu is configured. This function allows you to get the handle of the menu node when this associated command is called.

Note: This function should only be used with expressions or Cicode functions invoked from the Command field of a menu configuration record.

Syntax

MenuNodeGetCurr( )

Return Value

The handle of the menu node.

Related Functions

MenuGetChild, MenuGetFirstChild, MenuGetGenericNode, MenuGetNextChild, MenuGetPageNode, MenuGetParent, MenuGetPrevChild, MenuGetWindowNode, MenuNodeAddChild, MenuNodeGetDepth, MenuNodeGetExpanded, MenuNodeGetProperty, MenuNodeGetTargetPage, MenuNodeHasCommand, MenuNodeIsDisabled, MenuNodeIsHidden, MenuNodeRemove, MenuNodeRunCommand, MenuNodeSetDisabledWhen, MenuNodeSetHiddenWhen, MenuNodeSetProperty, MenuReload

Example

// Assume the following Cicode function is set to the Command field of a menu configuration record

FUNCTION MyMenuCommand()
    INT hNode = MenuNodeGetCurr();  // Get the current menu node that runs this command

    // Get more information from the menu record
    STRING sTargetPage = MenuNodeGetProperty(hNode, 13);

    // Display the page
    PageDisplay(sTargetPage);
END

See Also

Menu Functions

Published June 2018