From 503009cf37e9223a887c59936ba89d6d6aa11572 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 21 Feb 2008 13:39:42 +0000 Subject: [PATCH] user32: Add a test for CS_OWNDC windows that are created invisible. --- dlls/user32/tests/dce.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c index 72cd3fabd0c..c9b5fc9b059 100644 --- a/dlls/user32/tests/dce.c +++ b/dlls/user32/tests/dce.c @@ -375,6 +375,23 @@ static void test_begin_paint(void) "clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); } +static void test_invisible_create(void) +{ + HWND hwnd_owndc = CreateWindowA("owndc_class", NULL, WS_OVERLAPPED, + 0, 200, 100, 100, + 0, 0, GetModuleHandleA(0), NULL ); + HDC dc1, dc2; + + dc1 = GetDC(hwnd_owndc); + dc2 = GetDC(hwnd_owndc); + +todo_wine + ok(dc1 == dc2, "expected owndc dcs to match\n"); + + ReleaseDC(hwnd_owndc, dc2); + ReleaseDC(hwnd_owndc, dc1); + DestroyWindow(hwnd_owndc); +} START_TEST(dce) { @@ -414,4 +431,5 @@ START_TEST(dce) test_parameters(); test_dc_visrgn(); test_begin_paint(); + test_invisible_create(); }