Check? Function

Purpose

Interrogates a (Auto)CheckBox, a (Auto)RadioButton, or a BS_3STATEBOX button.

Syntax

a%=Check?(Dlg, item)

Dlg: ivar
item: ivar

Description

When a 0 is returned, it is not marked. When a 1 is returned, it is marked with a check mark or a cross. In case of a 3STATEBOX , a 2 is returned when it is filled.

Dlg is the number of the Dialog box or a window handle.
item is the number (ID) of the button/checkbox.

Example

Dialog # 1, 10, 10, 200, 100, "Testdialog"

AutoCheckBox "Checkbox", 100, 10, 10, 100, 20

EndDialog

ShowDialog # 1

SetCheck 1, 100, 1 ' check Checkbox ID = 100 in Dialog #1

Do

Sleep

Until Check?(1, 100) = 0

Message "Selected"

CloseDialog # 1

Remarks

This command is most useful in a GFA Editor Extension when creating a user interface with the Dialog command.

See Also

SetCheck

{Created by Sjouke Hamstra; Last updated: 24/09/2014 by James Gaite}