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:
parent
ea95d5559d
commit
33d4178865
|
@ -14,8 +14,8 @@ const (
|
||||||
areaxstyle = 0 | controlxstyle
|
areaxstyle = 0 | controlxstyle
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
var (
|
||||||
areaWndClass = "gouiarea"
|
areaWndClass = toUTF16("gouiarea")
|
||||||
)
|
)
|
||||||
|
|
||||||
func getScrollPos(hwnd _HWND) (xpos int32, ypos int32) {
|
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) {
|
func registerAreaWndClass() (err error) {
|
||||||
wc := &_WNDCLASS{
|
wc := &_WNDCLASS{
|
||||||
style: _CS_HREDRAW | _CS_VREDRAW, // no CS_DBLCLKS because do that manually
|
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),
|
lpfnWndProc: syscall.NewCallback(areaWndProc),
|
||||||
hInstance: hInstance,
|
hInstance: hInstance,
|
||||||
hIcon: icon,
|
hIcon: icon,
|
||||||
|
|
|
@ -111,7 +111,7 @@ var classTypes = [nctypes]*classData{
|
||||||
doNotLoadFont: true,
|
doNotLoadFont: true,
|
||||||
},
|
},
|
||||||
c_area: &classData{
|
c_area: &classData{
|
||||||
name: toUTF16(areaWndClass),
|
name: areaWndClass,
|
||||||
style: areastyle,
|
style: areastyle,
|
||||||
xstyle: areaxstyle,
|
xstyle: areaxstyle,
|
||||||
storeSysData: true,
|
storeSysData: true,
|
||||||
|
|
Loading…
Reference in New Issue