[2/2] oleaut32: Respect size of icons when drawing with IPicture_Render

Wilfried Pasquazzo wilfried.pasquazzo at gmail.com
Wed Oct 14 12:08:33 CDT 2009


Fix for Regression Bug: http://bugs.winehq.org/show_bug.cgi?id=20365
See [1/2] for details.


Wilfried Pasquazzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091014/a6a2a1aa/attachment.htm>
-------------- next part --------------
From e8467d7d57136d68e9b0c58f2a46739ae2ec6488 Mon Sep 17 00:00:00 2001
From: Wilfried Pasquazzo <wilfried.pasquazzo at gmail.com>
Date: Wed, 14 Oct 2009 19:00:45 +0200
Subject: [PATCH 2/2] Regression Fix for Bug 20365 too big icons

---
 dlls/oleaut32/olepicture.c       |    2 +-
 dlls/oleaut32/tests/olepicture.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 052aa9a..7a5bc29 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -684,7 +684,7 @@ static HRESULT WINAPI OLEPictureImpl_Render(IPicture *iface, HDC hdc,
     break;
   case PICTYPE_ICON:
     FIXME("Not quite correct implementation of rendering icons...\n");
-    DrawIcon(hdc,x,y,This->desc.u.icon.hicon);
+    DrawIconEx(hdc, x, y, This->desc.u.icon.hicon, cx, cy, 0, NULL, DI_NORMAL);
     break;
 
   case PICTYPE_METAFILE:
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 150fcf8..42f58ae 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -667,7 +667,7 @@ static void test_Render(void)
     ok(result != 0x00F0F0F0,
        "Color at 5,5 should have changed, but still was 0x%06X\n", result);
     result = GetPixel(hdc, 10, 10);
-    todo_wine ok(result == 0x00F0F0F0,
+    ok(result == 0x00F0F0F0,
        "Color at 10,10 should be unchanged 0xF0F0F0, but was 0x%06X\n", result);
 
     IPicture_Release(pic);
-- 
1.6.4.4


More information about the wine-patches mailing list