# ShowBuiltInCtrlMenuItem

int ShowBuiltInCtrlMenuItem (int panelHandle, int controlID, int builtInMenuItemID, int beforeMenuItemID);

## Purpose

Makes a control built-in popup menu show a built-in menu item.

Call this function only if you previously hid the menu item by calling HideBuiltInCtrlMenuItem.

Only table and tree controls own menus.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
builtInMenuItemID | integer | builtInMenuItemID must be one of the following constants:
Constant Name | Constant Value | Control Type
VAL_GOTO | –2 | Table
VAL_SEARCH | –3 | Table, Tree
VAL_SORT | –4 | Table, Tree
VAL_EXPAND_SUBTREE | –5 | Tree
VAL_COLLAPSE_SUBTREE | –6 | Tree
VAL_EXPAND_ALL | –7 | Tree
VAL_COLLAPSE_ALL | –8 | Tree
beforeMenuItemID | integer | The function inserts the built-in menu item above this menu item ID. The menu item ID is returned by the NewCtrlMenuItem or NewCtrlMenuSeparator functions, or is a constant identifying one of the built-in control menu items. The following lists the built-in menu item constants.
Constant Name | Constant Value | Control Type
VAL_GOTO | –2 | Table
VAL_SEARCH | –3 | Table, Tree
VAL_SORT | –4 | Table, Tree
VAL_EXPAND_SUBTREE | –5 | Tree
VAL_COLLAPSE_SUBTREE | –6 | Tree
VAL_EXPAND_ALL | –7 | Tree
VAL_COLLAPSE_ALL | –8 | Tree
To place the new menu item at the bottom of the menu item list, pass –1.

## Return Value

Name | Type | Description
menuItemID | integer | Returns the ID that you use to specify this menu item in subsequent function calls. Negative values indicate that an error occurred. Zero is not a valid ID.
Code | Error Message String
xx | (Menu item ID) Success