summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-04-11 11:32:27 -0400
committerPietro Gagliardi <[email protected]>2014-04-11 11:32:27 -0400
commit179ddba93a0c1ab2aed0825d2ecc27b291099723 (patch)
treebae5699de19d4cd77811e62ed60feb8c2371bd42
parent586ac941a487e1d8ce2e8fb8badc1e2cb225d583 (diff)
Added CS_HREDRAW and CS_VREDRAW to our Area on Windows, just to be safe.
-rw-r--r--area_windows.go7
1 files 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,