Create a color bitmap in CreateDIBitmap even with a black&white DC.

This commit is contained in:
Alexandre Julliard 2001-08-20 18:04:09 +00:00
parent 42c803630b
commit 87abe2f61c

View file

@ -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;