It may be useful for demonstrating cache behaviour, but fails too frequently on Windows to be reliable.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Interestingly enough, I see the same reuse behaviour even without DCX_CACHE. Only removing DCX_USESTYLE is enough to prevent the same handle from being reassigned.
dlls/user32/tests/dce.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c index 017506d9aa4..fd33c9078dd 100644 --- a/dlls/user32/tests/dce.c +++ b/dlls/user32/tests/dce.c @@ -650,14 +650,6 @@ static void test_destroyed_window(void) dc = GetDC( hwnd_cache ); ok( !dc, "Got a non-NULL DC (%p) for a destroyed window\n", dc );
- for (i = 0; i < 30; i++) - { - dc = hdcs[i] = GetDCEx( hwnd_parent, 0, DCX_CACHE | DCX_USESTYLE ); - if (dc == old_dc) break; - } - ok( i < 30, "DC for destroyed window not reused\n" ); - while (i > 0) ReleaseDC( hwnd_parent, hdcs[--i] ); - dc = GetDC( hwnd_classdc ); SetROP2( dc, R2_WHITE ); rop = GetROP2( dc );