Add a gdi32 test to highlight the CreateCompatibleDC problem =

Colin Finck mail at
Fri Apr 11 15:07:20 CDT 2008

described in bug #12493.=0A=
Mark this one with todo_wine.=0A=
 dlls/gdi32/tests/dc.c |   24 ++++++++++++++++++++++++=0A=
 1 files changed, 24 insertions(+), 0 deletions(-)=0A=
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c=0A=
index 79b6ef7..d0ca5cf 100644=0A=
--- a/dlls/gdi32/tests/dc.c=0A=
+++ b/dlls/gdi32/tests/dc.c=0A=
@@ -234,9 +234,33 @@ static void test_GdiConvertToDevmodeW(void)=0A=
     HeapFree(GetProcessHeap(), 0, dmW);=0A=
+static void test_CreateCompatibleDC(void)=0A=
+    BOOL bRet;=0A=
+    HDC hDC;=0A=
+    HDC hNewDC;=0A=
+    /* Create a DC compatible with the screen */=0A=
+    hDC =3D CreateCompatibleDC(NULL);=0A=
+    ok(hDC !=3D NULL, "CreateCompatibleDC returned %p\n", hDC);=0A=
+    /* Delete this DC, this should succeed */=0A=
+    bRet =3D DeleteDC(hDC);=0A=
+    ok(bRet =3D=3D TRUE, "DeleteDC returned %u\n", bRet);=0A=
+    /* Try to create a DC compatible to the deleted DC. This has to =
fail */=0A=
+    hNewDC =3D CreateCompatibleDC(hDC);=0A=
+    ok(hNewDC =3D=3D NULL, "CreateCompatibleDC returned %p\n", hNewDC);=0A=
+    test_CreateCompatibleDC();=0A=
-- =0A=


More information about the wine-patches mailing list