NewMenuBar
- Updated2023-02-21
- 1 minute(s) read
NewMenuBar
int NewMenuBar (int destinationPanelHandle);
Purpose
Creates a new menu bar to reside on a specific panel and returns a handle to the new menu bar.
Use the new menu bar handle in subsequent function calls to specify the menu bar.
If the destination panel is not currently in memory, pass a zero as the destinationPanelHandle. You can later assign the menu bar to a panel using SetPanelMenuBar.
Parameters
Input | ||
Name | Type | Description |
destinationPanelHandle | int | Handle of the panel on which to place the menu bar. You obtain destinationPanelHandle from LoadPanel, NewPanel, or DuplicatePanel. If the destination panel is not currently in memory, or if the menu bar is used only as a popup menu, pass a zero as the destination panel handle. You can later assign the menu bar to a panel using SetPanelMenuBar. |
Return Value
Name | Type | Description |
menuBarHandle | int | The handle you can use in subsequent function calls to specify this menu bar. Negative values indicate that an error occurred. Zero is not a valid handle. |
Additional Information
Library: User Interface Library
Include file: userint.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Example
Refer to apps\uirview\uirview.cws for an example of using the NewMenuBar function.