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 586b320..9be3007 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -143,3 +143,21 @@ func (s *sysData) hide() (err error) {
<-ret
return nil
}
+
+func (s *sysData) setText(text string) error {
+ ret := make(chan uiret)
+ defer close(ret)
+ uitask <- &uimsg{
+ call: _setWindowText,
+ p: []uintptr{
+ uintptr(s.hwnd),
+ uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text))),
+ },
+ ret: ret,
+ }
+ r := <-ret
+ if r.ret == 0 { // failure
+ return r.err
+ }
+ return nil
+}