diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-11 19:52:39 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-11 19:52:39 -0500 |
| commit | cee78198e483c7814d0a2654349ce3e3586b26c0 (patch) | |
| tree | 5e8f9ff3480bd6e77c80abc1781216f3ff105291 /sysdata_windows.go | |
| parent | 9bfe67c49d6580bf977403fecf4d345db7524747 (diff) | |
It appears the result of syscall.StringToUTF16Ptr() is only temporary, so removed all that. Now the program just hangs...
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index f454e89..a6fe15e 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -16,7 +16,7 @@ type sysData struct { } type classData struct { - name uintptr + name string style uint32 xstyle uint32 } @@ -26,12 +26,12 @@ type classData struct { var classTypes = [nctypes]*classData{ c_window: &classData{ - name: uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(stdWndClass))), + name: stdWndClass, style: _WS_OVERLAPPEDWINDOW, xstyle: 0, }, // c_button: &classData{ -// name: uintptr(unsafe.Pointer("BUTTON")) +// name: "BUTTON" // style: _BS_PUSHBUTTON | controlstyle, // xstyle: 0 | controlxstyle, // }, @@ -48,7 +48,7 @@ func (s *sysData) make() (err error) { call: _createWindowEx, p: []uintptr{ uintptr(ct.xstyle), - ct.name, + uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(ct.name))), uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(s.text))), uintptr(ct.style), uintptr(_CW_USEDEFAULT), // TODO |
