DC lock in CreateDIBitmap
Alexandre Julliard
julliard at winehq.com
Thu Aug 16 17:11:53 CDT 2001
Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de> writes:
> CreateDIBitmap is called with the HDC lock hold, and when the (fColor) clause
> is true, CreateDCA() checks that the lock is not hold. A laymans approach to
> release hdc before CreateDCA() and reopen it afterwards resulted in this
> report asr startup, with no visual output:
I don't think we should be using CreateDC at all in
CreateDIBitmap. Could you try this?
Index: objects/dib.c
===================================================================
RCS file: /opt/cvs-commit/wine/objects/dib.c,v
retrieving revision 1.59
diff -u -r1.59 dib.c
--- objects/dib.c 2001/08/15 23:33:20 1.59
+++ objects/dib.c 2001/08/16 21:08:12
@@ -875,12 +875,7 @@
/* 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;
--
Alexandre Julliard
julliard at winehq.com
More information about the wine-devel
mailing list