SaveMovableCtrlSettings
- Updated2023-02-21
- 6 minute(s) read
int SaveMovableCtrlSettings (int panelHandle, int controlID, const char *configurationName);
Purpose
Saves movable control settings to the custom control configuration file. You can use this function to save settings for a particular control or for all controls on a panel.
If you specify a particular control, the settings will be saved for only that control. Such a configuration may then be loaded onto a particular control (of the same type) using LoadMovableCtrlSettings.
If you specify -1 for the control, settings for all the controls on the panel will be saved to the configuration. This type of configuration may then be loaded back onto the same panel later.
The settings which are saved for a control are as follows:
- The value of all the Movable Control attributes
- The position of the control, label, and digital display
- The size of the control
Parameters
| Input | ||
| Name | Type | Description |
| panelHandle | int | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function. |
| controlID | int | The ID of the control you wish to make movable at run time. The ID is the defined constant that was assigned to the control or menu item in the User Interface Editor or the ID returned by NewCtrl or NewMenuItem. If -1, all controls on the panel are affected. |
| configurationName | const char * | Pass the name of the configuration in which to save the Movable Control settings. Configurations are stored in a file called custctrl.ini located in the same directory as your project or executable. |
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: Run-Time Movable Control
Include file: custctrl\movectrl.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later
Example
Refer to userint\custctrl\movectrl\movedemo.cws for an example of using the SaveMovableCtrlSettings function.