Toolbar_GetIndexFromMenu
- Updated2023-02-21
- 1 minute(s) read
int Toolbar_GetIndexFromMenu (ToolbarType toolbar, int menuItem, int *index);
Purpose
Searches for an item on the toolbar that is associated with a particular menu item. You can use this function if your toolbar items use menu callbacks and you need to access the corresponding toolbar items in the menu callbacks.
Parameters
| Input | ||
| Name | Type | Description |
| toolbar | ToolbarType | The specifier for the toolbar. Obtain this handle from the Toolbar_New or Toolbar_Duplicate functions. |
| menuItem | int | The menu item to search for. You can obtain this handle from NewMenuItem or in the .uir header file. |
| Output | ||
| Name | Type | Description |
| index | int | Returns the index of the first toolbar item with the specified menu item or |
Return Value
| Name | Type | Description |
| status | int | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |
Additional Information
Library: Toolbar
Include file: custctrl\toolbar.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later