Piotr Caban : user32/tests: Test that CS_PARENTDC enables child window to draw over whole parent window.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Feb 13 07:55:57 CST 2015
Module: wine
Branch: master
Commit: 33803586edcd79ef9d5f9d2fd48d0cebe3c5996e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=33803586edcd79ef9d5f9d2fd48d0cebe3c5996e
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Feb 13 11:38:24 2015 +0100
user32/tests: Test that CS_PARENTDC enables child window to draw over whole parent window.
---
dlls/user32/tests/dce.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c
index 4ce8d5d..dfd58a5 100644
--- a/dlls/user32/tests/dce.c
+++ b/dlls/user32/tests/dce.c
@@ -348,6 +348,7 @@ static void test_begin_paint(void)
HDC old_hdc, hdc;
RECT rect, parent_rect;
PAINTSTRUCT ps;
+ COLORREF cr;
/* cache DC */
@@ -427,6 +428,8 @@ static void test_begin_paint(void)
RedrawWindow( hwnd_parentdc, NULL, 0, RDW_INVALIDATE );
hdc = BeginPaint( hwnd_parentdc, &ps );
GetClipBox( hdc, &rect );
+ cr = SetPixel( hdc, 10, 10, RGB(255, 0, 0) );
+ ok( cr != -1, "error drawing outside of window client area\n" );
EndPaint( hwnd_parentdc, &ps );
GetClientRect( hwnd_parent, &parent_rect );
@@ -434,6 +437,10 @@ static void test_begin_paint(void)
ok( rect.top == parent_rect.top, "rect.top = %d, expected %d\n", rect.top, parent_rect.top );
todo_wine ok( rect.right == parent_rect.right, "rect.right = %d, expected %d\n", rect.right, parent_rect.right );
todo_wine ok( rect.bottom == parent_rect.bottom, "rect.bottom = %d, expected %d\n", rect.bottom, parent_rect.bottom );
+
+ hdc = GetDC( hwnd_parent );
+ todo_wine ok( GetPixel( hdc, 10, 10 ) == cr, "error drawing outside of window client area\n" );
+ ReleaseDC( hwnd_parent, hdc );
}
/* test ScrollWindow with window DCs */
More information about the wine-cvs
mailing list