summaryrefslogtreecommitdiff
path: root/sysdata_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'sysdata_windows.go')
-rw-r--r--sysdata_windows.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go
index 6856bc1..b62d90a 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -201,3 +201,21 @@ func (s *sysData) setRect(x int, y int, width int, height int) error {
}
return nil
}
+
+// TODO figure out how to handle error
+func (s *sysData) isChecked() (bool, error) {
+ ret := make(chan uiret)
+ defer close(ret)
+ uitask <- &uimsg{
+ call: _sendMessage,
+ p: []uintptr{
+ uintptr(s.hwnd),
+ uintptr(_BM_GETCHECK),
+ uintptr(0),
+ uintptr(0),
+ },
+ ret: ret,
+ }
+ r := <-ret
+ return r.ret == _BST_CHECKED, nil
+}