From cde9a5f8956228ea6bda3f63f77ba20ec0beadea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 8 Nov 2012 14:46:47 +0000 Subject: [PATCH] [GDI32_APITEST] - Add test showing that a bitmap created using CreateDIBItmap can be selected into a DC despite a different bits depth svn path=/trunk/; revision=57693 --- rostests/apitests/gdi32/CreateDIBitmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rostests/apitests/gdi32/CreateDIBitmap.c b/rostests/apitests/gdi32/CreateDIBitmap.c index f2ce391f992..4a3d4cd748f 100644 --- a/rostests/apitests/gdi32/CreateDIBitmap.c +++ b/rostests/apitests/gdi32/CreateDIBitmap.c @@ -415,7 +415,7 @@ void Test_CreateDIBitmap_RLE8() void Test_CreateDIBitmap_CBM_CREATDIB(void) { - HBITMAP hbmp; + HBITMAP hbmp, hbmpOld; HDC hdc; BITMAPINFO bmi = {{sizeof(BITMAPINFOHEADER), 4, 4, 1, 8, BI_RGB, 0, 1, 1, 1, 0}, {{0,0,0,0}}}; @@ -437,6 +437,11 @@ Test_CreateDIBitmap_CBM_CREATDIB(void) ok_int(bitmap.bmBitsPixel, 8); ok_ptr(bitmap.bmBits, 0); + hbmpOld = SelectObject(hdc, hbmp); + ok(hbmpOld != NULL, "Couldn't select the bitmap.\n"); + SelectObject(hdc, hbmpOld); + DeleteObject(hbmp); + DeleteDC(hdc); } START_TEST(CreateDIBitmap)