PATCH: olepictures black & white

Marcus Meissner marcus at jet.franken.de
Mon Aug 20 00:05:59 CDT 2001


> Maybe a bit of both... I think the patch below should fix the GDI
> part; but is there any reason you don't use GetDC(0) instead of
> CreateCompatibleDC?  It would avoid creating a new DC every time.

Your patch works.

I have also replaced CreateDCA by GetDC(0) (which works without your
patch too).

Ciao, Marcus

Changelog:
	Use GetDC(0) instead of CreateCompatibleDC(0).

Index: olepicture.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/olepicture.c,v
retrieving revision 1.9
diff -u -r1.9 olepicture.c
--- olepicture.c	2001/08/09 21:35:59	1.9
+++ olepicture.c	2001/08/20 05:09:42
@@ -882,7 +882,7 @@
     HeapFree(GetProcessHeap(),0,samprow);
     jpeg_finish_decompress(&jd);
     jpeg_destroy_decompress(&jd);
-    hdcref = CreateCompatibleDC(0);
+    hdcref = GetDC(0);
     This->desc.u.bmp.hbitmap=CreateDIBitmap(
 	    hdcref,
 	    &bmi,
@@ -910,7 +910,7 @@
     /* Does not matter whether this is a coreheader or not, we only use
      * components which are in both
      */
-    hdcref = CreateCompatibleDC(0);
+    hdcref = GetDC(0);
     This->desc.u.bmp.hbitmap = CreateDIBitmap(
 	hdcref,
 	&(bi->bmiHeader),




More information about the wine-patches mailing list