Migrated area_windows.go to the new string handling. I think that's it for converting existing code... Now to test on real Windows.

This commit is contained in:
Pietro Gagliardi 2014-06-03 11:04:31 -04:00
parent ea95d5559d
commit 33d4178865
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -111,7 +111,7 @@ var classTypes = [nctypes]*classData{
doNotLoadFont: true,
},
c_area: &classData{
name: toUTF16(areaWndClass),
name: areaWndClass,
style: areastyle,
xstyle: areaxstyle,
storeSysData: true,