Marks a checkbox or radio button
SetCheck dlg, item, flag
dlg, item, flag:integer expression
SetCheck is the opposite of Check?(). With SetCheck 1,40,1 the checkbox or radio button in the Dialog box #1 with ID=40 is marked 1.
Dialog # 1, 10, 10, 200, 100, "Testdialog", WS_SYSMENU
AutoCheckBox "Checkbox", 100, 10, 10, 100, 20
LText "Checked", 101, 10, 40, 70, 16
EndDialog
ShowDialog # 1
// mark the CheckBox with the ID 100
// in the Dialog # 1
SetCheck 1, 100, 1
Do
Sleep
Until Dlg_1 Is Nothing
Sub Dlg_1_Close(Cancel?)
Cancel? = False
EndSub
Sub Dlg_1_Message(hWnd%, Mess%, wParam%, lParam%)
If Mess% = WM_COMMAND And wParam% = 100
_Win$(Dlg(1, 101)) = (Check?(1, 100) ? "Checked" : "Unchecked")
EndIf
EndSub
{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}