diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-13 15:14:10 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-13 15:14:10 -0500 |
| commit | 44842fea4b2a46ded301fb460a9a0f998fc2ee0c (patch) | |
| tree | 23e7cb18336960022df2764fc6c4243d29024242 /sysdata_windows.go | |
| parent | f3c77bda6e720fe7750fc3db2aa38f8b74faf585 (diff) | |
Added Checkbox.Checked().
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 18 |
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 +} |
