From 87abe2f61cab0f22b70f1444bd585ebcc4355158 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 20 Aug 2001 18:04:09 +0000 Subject: [PATCH] Create a color bitmap in CreateDIBitmap even with a black&white DC. --- objects/dib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/objects/dib.c b/objects/dib.c index 4c0e4050979..04f0c9e6012 100644 --- a/objects/dib.c +++ b/objects/dib.c @@ -875,7 +875,9 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header, /* Now create the bitmap */ - if (fColor) handle = CreateCompatibleBitmap( hdc, width, height ); + if (fColor) + handle = CreateBitmap( width, height, GetDeviceCaps( hdc, PLANES ), + GetDeviceCaps( hdc, BITSPIXEL ), NULL ); else handle = CreateBitmap( width, height, 1, 1, NULL ); if (!handle) return 0; -- 2.11.4.GIT