LabWindows/CVI

Content Type
Programming Language
Current manual

InsertSeparator

InsertSeparator

int InsertSeparator (int menuBarHandle, int menuID, int beforeMenuItemID);

Purpose

Inserts a new separator bar in a menu, and returns a menu item ID you can use in subsequent function calls to specify the separator.

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.
menuID int ID for a particular menu within a menu bar. The ID must be a constant name, located in the .uir header file, that you assign in the User Interface Editor or a value that you obtain from functions such as NewMenu and NewSubMenu.
beforeMenuItemID int Menu item ID above which to insert the separator bar. To place the separator 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 3.0 and later

Example

Refer to apps\uirview\uirview.cws for an example of using the InsertSeparator function.

Was this information helpful?