GETSTATE

Top  Previous  Next

Syntax

INT = GETSTATE(win as WINDOW,id as INT)

Description

Returns the state of a checkbox or radio button control.

Parameters

win - Window or dialog containing the control.

id - Controls identifier.

Return value

Returns 1 if control is checked and 0 if control is unchecked.

Remarks

Radio buttons in a group are mutually exclusive. When a radio button is selected your program will receive an @IDCONTROL message with @CONTROLID containing the newly selected radio button. If the radio button is created outside of a group, you will need to use GETSTATE to determine whether the button is selected.

See Also: SETSTATE

Example usage

state = GETSTATE(mydlg, 5)