diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-12 18:14:37 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-12 18:14:37 -0500 |
| commit | a9ff38894408e0a34da4742fc2b1aea0bb5ef60b (patch) | |
| tree | 2c4e58eb079cdd59537216943fc97fdd4fbd7a2d /sysdata_windows.go | |
| parent | 0a9f40812950ad00239e93141a37183666d5f3eb (diff) | |
Added Window.SetTitle(). Also oops, forgot to mark the window as created.
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 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 +} |
