summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--area_windows.go6
-rw-r--r--sysdata_windows.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/area_windows.go b/area_windows.go
index ace3cba..60f4e13 100644
--- a/area_windows.go
+++ b/area_windows.go
@@ -14,8 +14,8 @@ const (
areaxstyle = 0 | controlxstyle
)
-const (
- areaWndClass = "gouiarea"
+var (
+ areaWndClass = toUTF16("gouiarea")
)
func getScrollPos(hwnd _HWND) (xpos int32, ypos int32) {
@@ -690,7 +690,7 @@ func areaWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESU
func registerAreaWndClass() (err error) {
wc := &_WNDCLASS{
style: _CS_HREDRAW | _CS_VREDRAW, // no CS_DBLCLKS because do that manually
- lpszClassName: uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(areaWndClass))),
+ lpszClassName: utf16ToArg(areaWndClass),
lpfnWndProc: syscall.NewCallback(areaWndProc),
hInstance: hInstance,
hIcon: icon,
diff --git a/sysdata_windows.go b/sysdata_windows.go
index 9526b23..46cbf56 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -111,7 +111,7 @@ var classTypes = [nctypes]*classData{
doNotLoadFont: true,
},
c_area: &classData{
- name: toUTF16(areaWndClass),
+ name: areaWndClass,
style: areastyle,
xstyle: areaxstyle,
storeSysData: true,