cCheckBox

This function is used to examine or modify the status of checkboxes.

Syntax:

cCheckBox( hwnd, flag)

Parameters:

(i) hwnd CheckBox handle from a cWndBy... function.

(i) flag See below.

Returns:

(i) Previous state of checkbox.

 

Flags

Meaning

-1

Examine the settings of a checkbox

0 Not Checked

1 Checked

2 Grayed (not disabled) (checks status of a 3-state checkbox)

 

0

Clears a checkbox

1

Sets a checkbox

2

Grays a 3-state checkbox (Do NOT use on standard checkboxes)

 

Example:
AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
Run("calc.exe", "")
title = "Calc"
WinWaitExist(title, 5)
hwnd = DllHwnd(title)
ControlHandle = cWndbyname(hwnd,`Inv~`)
result = cCheckbox(ControlHandle, -1) ; Examines a checkbox
Switch result
   Case 0
      Pause('Check box is...','Not Checked')
      Break
   Case 1
      Pause('Check box is...','Checked')
      Break
   Case 2
      Pause('Check box is...','Grayed (not disabled)')
      Break
EndSwitch
Exit
See Also:

cRadioButton, cClickButton