oleaut32: render bitmaps that arealready selected into a DC
Evan Stade
estade at gmail.com
Thu Aug 9 20:24:57 CDT 2007
Hi,
before, it wouldn't render at all because it tried to select the
bitmap into another DC (bitmaps can only be selected into one DC at a
time)
dlls/oleaut32/olepicture.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
--
Evan Stade
-------------- next part --------------
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index d8f01db..ee92495 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -634,6 +634,9 @@ static HRESULT WINAPI OLEPictureImpl_Ren
HBITMAP hbmpOld;
HDC hdcBmp;
+ if(This->hDCCur)
+ SelectObject(This->hDCCur, CreateBitmap(1, 1, 1, 1, NULL));
+
/* Set a mapping mode that maps bitmap pixels into HIMETRIC units.
NB y-axis gets flipped */
@@ -670,6 +673,9 @@ static HRESULT WINAPI OLEPictureImpl_Ren
SelectObject(hdcBmp, hbmpOld);
DeleteDC(hdcBmp);
+
+ if(This->hDCCur)
+ DeleteObject(SelectObject(This->hDCCur, This->desc.u.bmp.hbitmap));
}
break;
case PICTYPE_ICON:
--
1.4.1
More information about the wine-patches
mailing list