NewSubMenu
- Updated2023-02-21
- 1 minute(s) read
int NewSubMenu (int menuBarHandle, int menuItemID);
Purpose
Creates a submenu, attaches it to a specific menu item, and returns a submenu ID you use to specify the submenu in subsequent function calls.
A submenu appears as a triangle on the right side of the menu item.
Parameters
Input | ||
Name | Type | Description |
menuBarHandle | int | Specifier for a particular menu bar that is currently in memory. You can obtain
this handle from functions such as LoadMenuBar and NewMenuBar. If the menu bar was automatically loaded through LoadPanel, use GetPanelMenuBar to get the menu bar handle. |
menuItemID | int | Menu item to which to attach the submenu. The menu item ID must be a constant name you assign in the User Interface Editor or a value you obtain from NewMenuItem. |
Return Value
Name | Type | Description |
subMenuID | int | ID that you use to specify this submenu 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 3.0 and later