Commit e22a1e68 authored by Alexandre Julliard's avatar Alexandre Julliard

Use the passed hdc in CreateDIBitmap instead of creating a new one.

parent 78f9fae7
......@@ -875,12 +875,7 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
/* Now create the bitmap */
if (fColor)
{
HDC tmpdc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
handle = CreateCompatibleBitmap( tmpdc, width, height );
DeleteDC( tmpdc );
}
if (fColor) handle = CreateCompatibleBitmap( hdc, width, height );
else handle = CreateBitmap( width, height, 1, 1, NULL );
if (!handle) return 0;
......
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