From 13d0c285ca9ccff317404185a97cb89da0a9cd0e Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 18 Nov 2003 00:03:51 +0000 Subject: [PATCH] A bitmap created by CreateCompatibleBitmap should not be owned by a driver until it is selected into it. The driver checks that the bitmap is of the correct depth in SelectBitmap. --- objects/bitmap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/objects/bitmap.c b/objects/bitmap.c index eaabfad883a..8d36f4825a2 100644 --- a/objects/bitmap.c +++ b/objects/bitmap.c @@ -178,12 +178,6 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height) hbmpRet = CreateBitmap( 1, 1, 1, 1, NULL ); else hbmpRet = CreateBitmap( width, height, 1, dc->bitsPerPixel, NULL ); - - if (!BITMAP_SetOwnerDC( hbmpRet, dc )) - { - DeleteObject( hbmpRet ); - hbmpRet = 0; - } } TRACE("\t\t%p\n", hbmpRet); GDI_ReleaseObj(hdc);