[API]
IsDlgButtonChecked
CheckDlgButton

[CODE]
Public Function LoadResEx_Dialog_CheckBool(ByVal DialogHWnd As Long, ByVal ControlID As Long, ByRef Value As Boolean, Optional ByVal ReadFromDialog As Boolean = False) As Boolean ', Optional ByVal Depency1ControlID As Long, Optional ByVal Depency1ControlID As Long) as boolean
  If ReadFromDialog Then
    If Not GetDlgItem(DialogHWnd, ControlID) = 0& Then
      LoadResEx_Dialog_CheckBool = CBool(IsDlgButtonChecked(DialogHWnd, ControlID))
      If LoadResEx_Dialog_CheckBool Xor Value Then
        Value = LoadResEx_Dialog_CheckBool
        LoadResEx_Dialog_CheckBool = True
        Else
        LoadResEx_Dialog_CheckBool = False
        End If
      End If
    Else
    Call CheckDlgButton(DialogHWnd, ControlID, -CLng(Value))
    End If
  End Function