VB Code:
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" ( _
ByVal hWnd As Long, _
ByVal nIndex As Long _
) As Long
Private Const GWL_STYLE As Long = -16
Private Const BS_CHECKBOX As Long = &H2&
Private Const BS_3STATE As Long = &H5&
Public Function IsWindowCheckBox(ByVal hWnd As Long) As Boolean
Dim nStyle As Long
Dim b As Boolean
nStyle = GetWindowLong(hWnd, GWL_STYLE)
b = (((nStyle And BS_CHECKBOX) = BS_CHECKBOX) Or _
((nStyle And BS_3STATE) = BS_3STATE))
IsWindowCheckBox = b
End Function
However if you know the caption of the checkbox simply specify that together with the class name in the call to FindWindowEx.