From 179ddba93a0c1ab2aed0825d2ecc27b291099723 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 11 Apr 2014 11:32:27 -0400 Subject: [PATCH] Added CS_HREDRAW and CS_VREDRAW to our Area on Windows, just to be safe. --- area_windows.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/area_windows.go b/area_windows.go index c8d201f..f29c3a7 100644 --- a/area_windows.go +++ b/area_windows.go @@ -595,8 +595,11 @@ func areaWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lPara func registerAreaWndClass(s *sysData) (newClassName string, err error) { const ( + _CS_HREDRAW = 0x0002 + _CS_VREDRAW = 0x0001 + // from winuser.h - _CS_DBLCLKS = 0x0008 + _CS_DBLCLKS = 0x0008 // needed to be able to register double-clicks ) areaWndClassNumLock.Lock() @@ -605,7 +608,7 @@ func registerAreaWndClass(s *sysData) (newClassName string, err error) { areaWndClassNumLock.Unlock() wc := &_WNDCLASS{ - style: _CS_DBLCLKS, // needed to be able to register double-clicks + style: _CS_DBLCLKS | _CS_HREDRAW | _CS_VREDRAW, lpszClassName: uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(newClassName))), lpfnWndProc: syscall.NewCallback(areaWndProc(s)), hInstance: hInstance,