Admin Production ni-theme
Current Publication

RecallPanelState

LabWindows/CVI

RecallPanelState

int RecallPanelState (int panelHandle, char filename[], int stateIndex);

Purpose

Reads a panel state from a file you previously created with SavePanelState. If the panel is currently visible, all controls are updated to reflect their new states.

Notes   
  • If you have modified the panel in the User Interface Editor or programmatically since you saved the panel state, recalling the panel state can fail or erroneously change the current state of the panel.

    If one of the controls in the panel is an ActiveX control, any CAObjHandle that you had previously obtained for that control is no longer valid. After calling this function, you must use GetObjHandleFromActiveXCtrl to obtain a new handle.
  • If you use the intptr_t or uintptr_t data type for a control, you must save and load the data from the controls in the same bitness. For example, you cannot save the data in a 64-bit application and then load the data in a 32-bit application.

Parameters

Input
Name Type Description
panelHandle int Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel.
filename char [] Name of the file in which you saved the panel state. If the name is a simple filename that contains no directory path, then the file is loaded from the directory that contains the executable.
stateIndex int The state index you assigned to the panel state when you saved it with SavePanelState.

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: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later