# 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.

| Note 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.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
filename | string | 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 | integer | The state index you assigned to the panel state when you saved it with SavePanelState.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success