Added CS_HREDRAW and CS_VREDRAW to our Area on Windows, just to be safe.

This commit is contained in:
Pietro Gagliardi 2014-04-11 11:32:27 -04:00
parent 586ac941a4
commit 179ddba93a
1 changed files with 5 additions and 2 deletions

View File

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