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.
Supported Controls
You can use ShowBuiltInCtrlMenuItem with the following controls:
Parameters
Input | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
panelHandle | int | Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
controlID | int | 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 functions such as NewCtrl and DuplicateCtrl. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
builtInMenuItemID | int | The built-in menu item to display. builtInMenuItemID must be one of the following constants:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
beforeMenuItemID | int | The menu item ID above which to insert the new built-in menu item. Use a menuItemID you obtained from NewCtrlMenuItem or NewCtrlMenuSeparator, or use a constant that identifies one of the built-in control menu items. The following lists the built-in menu item constants:
To place the new menu item at the bottom of the menu item list, pass –1. |
Return Value
Name | Type | Description |
menuItemID | int | 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. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later
Example
Refer to userint\treemenu.cws for an example of using the ShowBuiltInCtrlMenuItem function.