WinXAddCheckButton


hCheck = WinXAddCheckButton (parent, STRING title, isFirst, pushlike, id)

Creates a new check button and adds it to the window

Parameter Description
parent The handle to the window to add this check button to
STRING title The text that appears to the right of the check box
isFirst $$TRUE if this is the first check button in a set of check buttons
pushlike $$TRUE if this control is to be rendered as a pushbutton
id The unique id constant for this control

Returns

The handle to the check button or 0 on fail

Remarks

The isFirst parameter is used to group check boxes so that the user can navigate between check boxes within a group using the arrow keys when the dialog interface is enabled. To group your check boxes, set the isFirst parameter to $$TRUE for the first check box and $$FALSE for all subsequent check boxes.

If pushlike is $$TRUE, this function will create a pushbutton which can be toggled from pressed to unpressed, corresponding to the checked and unchecked states of a check box.

Examples

'define constants
$$ID_CHECK1 = 100
$$ID_CHECK2 = 101
$$ID_CHECK3 = 102

'create a set of check boxes
hCheck1 = WinXAddCheckButton (#hMain, "Item 1", $$TRUE, $$FALSE, $$ID_CHECK1)
hCheck2 = WinXAddCheckButton (#hMain, "Item 2", $$FALSE, $$FALSE, $$ID_CHECK2)
hCheck3 = WinXAddCheckButton (#hMain, "Item 3", $$FALSE, $$FALSE, $$ID_CHECK3)

Related Links

WinXButton_SetCheck
WinXButton_GetCheck
WinXEnableDialogInterface