Commit 0a953f11 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

user32/tests: Release window DCs consistently.

parent 224d284f
...@@ -1070,6 +1070,8 @@ static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm) ...@@ -1070,6 +1070,8 @@ static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm)
ok(ret == bm.bmHeight, "%s: %d lines were converted, not %d\n", test_desc, ret, bm.bmHeight); ok(ret == bm.bmHeight, "%s: %d lines were converted, not %d\n", test_desc, ret, bm.bmHeight);
ok(color_match(pixel, 0x00ffffff), "%s: Pixel is 0x%08x\n", test_desc, pixel); ok(color_match(pixel, 0x00ffffff), "%s: Pixel is 0x%08x\n", test_desc, pixel);
ReleaseDC(NULL, hdc);
} }
static void test_LoadImageFile(const char * test_desc, const unsigned char * image_data, static void test_LoadImageFile(const char * test_desc, const unsigned char * image_data,
......
...@@ -99,6 +99,7 @@ static void test_updates(int style, int flags) ...@@ -99,6 +99,7 @@ static void test_updates(int style, int flags)
HDC hdc = GetDC( hStatic); HDC hdc = GetDC( hStatic);
COLORREF colour = GetPixel( hdc, 10, 10); COLORREF colour = GetPixel( hdc, 10, 10);
ok ( colour != 0, "pixel should NOT be painted black!\n"); ok ( colour != 0, "pixel should NOT be painted black!\n");
ReleaseDC(hStatic, hdc);
} }
if (style != SS_ETCHEDHORZ && style != SS_ETCHEDVERT) if (style != SS_ETCHEDHORZ && style != SS_ETCHEDVERT)
exp = 4; exp = 4;
......
...@@ -2918,7 +2918,8 @@ static void test_GetSystemMetrics( void) ...@@ -2918,7 +2918,8 @@ static void test_GetSystemMetrics( void)
trace( "Captionfontchar width %d MenuFont %d,%d CaptionWidth from registry: %d screen %d,%d\n", trace( "Captionfontchar width %d MenuFont %d,%d CaptionWidth from registry: %d screen %d,%d\n",
avcwCaption, tmMenuFont.tmHeight, tmMenuFont.tmExternalLeading, CaptionWidthfromreg, screen.cx, screen.cy); avcwCaption, tmMenuFont.tmHeight, tmMenuFont.tmExternalLeading, CaptionWidthfromreg, screen.cx, screen.cy);
} }
ReleaseDC( 0, hdc);
DeleteDC(hdc);
} }
static void test_EnumDisplaySettings(void) static void test_EnumDisplaySettings(void)
......
...@@ -5242,6 +5242,7 @@ static void test_scrolldc( HWND parent) ...@@ -5242,6 +5242,7 @@ static void test_scrolldc( HWND parent)
if (winetest_debug > 0) dump_region(hrgn); if (winetest_debug > 0) dump_region(hrgn);
/* clean up */ /* clean up */
ReleaseDC(hwnd1, hdc);
DeleteObject(hrgn); DeleteObject(hrgn);
DeleteObject(exprgn); DeleteObject(exprgn);
DeleteObject(tmprgn); DeleteObject(tmprgn);
......
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