Commit f80802ed authored by Alexandre Julliard's avatar Alexandre Julliard

user32/tests: Also test device caps on a released DC.

parent bab3a3d5
...@@ -40,7 +40,7 @@ static void test_dc_attributes(void) ...@@ -40,7 +40,7 @@ static void test_dc_attributes(void)
{ {
HDC hdc, old_hdc; HDC hdc, old_hdc;
HDC hdcs[20]; HDC hdcs[20];
INT i, rop, def_rop; INT i, rop, def_rop, caps;
BOOL found_dc; BOOL found_dc;
/* test cache DC */ /* test cache DC */
...@@ -118,8 +118,29 @@ static void test_dc_attributes(void) ...@@ -118,8 +118,29 @@ static void test_dc_attributes(void)
ok( rop == 0, "got %d\n", rop ); ok( rop == 0, "got %d\n", rop );
rop = GetROP2( old_hdc ); rop = GetROP2( old_hdc );
ok( rop == 0, "got %d\n", rop ); ok( rop == 0, "got %d\n", rop );
caps = GetDeviceCaps( old_hdc, HORZRES );
ok( caps == 0, "got %d\n", caps );
caps = GetDeviceCaps( old_hdc, VERTRES );
ok( caps == 0, "got %d\n", caps );
caps = GetDeviceCaps( old_hdc, NUMCOLORS );
ok( caps == 0, "got %d\n", caps );
ok( WindowFromDC( old_hdc ) == 0, "wrong window\n" ); ok( WindowFromDC( old_hdc ) == 0, "wrong window\n" );
hdc = GetDC(0);
caps = GetDeviceCaps( hdc, HORZRES );
ok( caps != 0, "got %d\n", caps );
caps = GetDeviceCaps( hdc, VERTRES );
ok( caps != 0, "got %d\n", caps );
caps = GetDeviceCaps( hdc, NUMCOLORS );
ok( caps != 0, "got %d\n", caps );
ReleaseDC( 0, hdc );
caps = GetDeviceCaps( hdc, HORZRES );
ok( caps == 0, "got %d\n", caps );
caps = GetDeviceCaps( hdc, VERTRES );
ok( caps == 0, "got %d\n", caps );
caps = GetDeviceCaps( hdc, NUMCOLORS );
ok( caps == 0, "got %d\n", caps );
/* test own DC */ /* test own DC */
hdc = GetDC( hwnd_owndc ); hdc = GetDC( hwnd_owndc );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment