summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-26 21:40:23 -0400
committerPietro Gagliardi <[email protected]>2014-06-26 21:40:23 -0400
commitebbd76716f3e35bdb86a6ca9b327bc014d7f6e3b (patch)
treec6e5bcb45c295035b926da11ef38c3017aa64fba
parent098beef9969ae625714de4a23c5899a70a6557ca (diff)
Implemented Checkbox.SetChecked() on Windows.
-rw-r--r--sysdata_windows.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go
index f3ecffe..504b715 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -635,3 +635,21 @@ func (s *sysData) center() {
}
<-ret
}
+
+func (s *sysData) setChecked(checked bool) {
+ ret := make(chan struct{})
+ defer close(ret)
+ uitask <- func() {
+ c := uintptr(_BST_CHECKED)
+ if !checked {
+ c = uintptr(_BST_UNCHECKED)
+ }
+ _sendMessage.Call(
+ uintptr(s.hwnd),
+ uintptr(_BM_SETCHECK),
+ c,
+ uintptr(0))
+ ret <- struct{}{}
+ }
+ <-ret
+}