CtrlSetState

InstallShield 2014 » InstallScript Language Reference

The CtrlSetState function sets the current state of a check box or option button control in a custom dialog. You can set certain characteristics of option buttons and check boxes when you create them using a resource or dialog editor. If you experience difficulties with the behavior of a button control, check the characteristics of the control in the editor.

Syntax

CtrlSetState ( szDialogName, nControlID, nState );

Parameters

CtrlSetState Parameters

Parameter

Description

szDialogName

Specifies the name of a dialog that contains the check box or option button control.

nControlID

Specifies the resource ID of the check box or option button control.

nState

Specifies the new state of the button control. Pass one of the following predefined constants in this parameter:

BUTTON_CHECKED—Sets the button's state to CHECKED.
BUTTON_UNCHECKED—Sets the button's state to UNCHECKED.

Return Values

CtrlSetState Return Values

Return Value

Description

0

CtrlSetState successfully set the state of the check box or option button control.

< 0

CtrlSetState was unable to set the state of the control.

See Also