summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-11 19:52:39 -0500
committerPietro Gagliardi <[email protected]>2014-02-11 19:52:39 -0500
commitcee78198e483c7814d0a2654349ce3e3586b26c0 (patch)
tree5e8f9ff3480bd6e77c80abc1781216f3ff105291 /stdwndclass_windows.go
parent9bfe67c49d6580bf977403fecf4d345db7524747 (diff)
It appears the result of syscall.StringToUTF16Ptr() is only temporary, so removed all that. Now the program just hangs...
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index c550201..b2b82fd 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -7,7 +7,7 @@ import (
"unsafe"
)
-const (
+var (
stdWndClass = "gouiwndclass"
)
@@ -57,7 +57,7 @@ type _WNDCLASS struct {
hCursor _HANDLE
hbrBackground _HBRUSH
lpszMenuName *uint16
- lpszClassName *uint16
+ lpszClassName uintptr
}
func registerStdWndClass() (err error) {
@@ -83,7 +83,7 @@ func registerStdWndClass() (err error) {
cursor := _HANDLE(r1)
wc := &_WNDCLASS{
- lpszClassName: syscall.StringToUTF16Ptr(stdWndClass),
+ lpszClassName: uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(stdWndClass))),
lpfnWndProc: syscall.NewCallback(stdWndProc),
hInstance: hInstance,
hIcon: icon,