summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,