win32: transparent canvases

original commit: a6d25247283f5aef4287b78018f0cafb502f7559
This commit is contained in:
Matthew Flatt 2010-10-09 20:29:07 -06:00
parent c9d4a32c60
commit 3156ae4ee8
2 changed files with 4 additions and 5 deletions

View File

@ -31,6 +31,7 @@
(define _HRGN _pointer)
(define-user32 GetDCEx (_wfun _HWND _HRGN _DWORD -> _HDC))
(define DCX_WINDOW #x00000001)
(define DCX_CACHE #x00000002)
(define EP_EDITTEXT 1)
(define ETS_NORMAL 1)
@ -151,7 +152,7 @@
(if control-border-theme
(let* ([r (GetWindowRect canvas-hwnd)]
[res (default w msg wParam lParam)]
[hdc (GetDCEx canvas-hwnd #f DCX_WINDOW)]
[hdc (GetDCEx canvas-hwnd #f (bitwise-ior DCX_CACHE DCX_WINDOW))]
[wr (make-RECT 0 0
(- (RECT-right r) (RECT-left r))
(- (RECT-bottom r) (RECT-top r)))])

View File

@ -100,16 +100,14 @@
#f ; menu
"PLTFrame")))
(void (RegisterClassW (make-WNDCLASS CS_OWNDC
(void (RegisterClassW (make-WNDCLASS 0 ; using CS_OWNDC creates trouble when resizing?
wind-proc
0
0
hInstance
#f
#f
(let ([p (ptr-add #f (+ COLOR_WINDOW 1))])
(cpointer-push-tag! p 'HBRUSH)
p)
#f ; transparent
#f ; menu
"PLTCanvas")))