Rob Shearman : ole32: The width of the metafile drawn should be 3 times the icon width in OleMetafilePictFromIconAndLabel .

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 4 07:16:55 CST 2006


Module: wine
Branch: master
Commit: d7d3309e0aed9065af19c908c91db6bedd01cf68
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d7d3309e0aed9065af19c908c91db6bedd01cf68

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Dec  1 15:05:38 2006 +0000

ole32: The width of the metafile drawn should be 3 times the icon width in OleMetafilePictFromIconAndLabel.

---

 dlls/ole32/ole32_main.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/ole32_main.c b/dlls/ole32/ole32_main.c
index 493d246..c15c3e8 100644
--- a/dlls/ole32/ole32_main.c
+++ b/dlls/ole32/ole32_main.c
@@ -91,8 +91,11 @@ HGLOBAL WINAPI OleMetafilePictFromIconAn
 		GetTextExtentPoint32W(hdcScreen, lpszLabel, lstrlenW(lpszLabel), &text_size);
 		SelectObject(hdcScreen, screen_old_font);
 		ReleaseDC(NULL, hdcScreen);
+
+		width = 3 * icon_width;
 	}
-	width = max(text_size.cx, icon_width);
+	else
+		width = icon_width;
 
 	SetWindowOrgEx(hdc, 0, 0, NULL);
 	SetWindowExtEx(hdc, width, label_offset + text_size.cy, NULL);




More information about the wine-cvs mailing list