LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

Toolbar_SaveStates

int Toolbar_SaveStates (const char *destinationFile, ...);

Purpose

Saves all the user-configurable states of all of the toolbars on all of the panels you specify and also saves any floating toolbars. Pass a list of panel IDs terminated with a 0. For example, pass Toolbar_SaveStates ("tb_state.ini", hMainPanel, hOtherPanel, 0);

Note that this function saves states only for toolbars and not for the panels they may reside in (size and so on). To guarantee that toolbar states are properly restored, you also should save the size of any panels they may be docked in.

Also note that the toolbar name is used to match up toolbars between saving and loading so all toolbar names should be unique. If they are not, the relative order of toolbars will be used to match saved and loaded toolbars.

Parameters

Input
Name Type Description
destinationFile const char * The destination .ini file to which the current toolbar states will be saved.
panelList ... A 0-terminated list of panels. LabWindows/CVI saves the state of toolbars on these panels. Toolbars that are floating will always have their state saved.

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 8.0 and later

Example

Refer to userint\custctrl\toolbar\tooldemo.cws for an example of using the Toolbar_SaveStates function.

Log in to get a better experience