ole32: Fill in the xExt and yExt fields in OleMetafilePictFromIconAndLabel.

This commit is contained in:
Rob Shearman 2006-12-01 15:05:30 +00:00 committed by Alexandre Julliard
parent 2fa7cadf07
commit cdb86c6c90
1 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(ole);
#define HIMETRIC_INCHES 2540
/***********************************************************************
* OleMetafilePictFromIconAndLabel (OLE32.@)
*/
@ -120,7 +122,10 @@ HGLOBAL WINAPI OleMetafilePictFromIconAndLabel(HICON hIcon, LPOLESTR lpszLabel,
}
mfp.mm = MM_ANISOTROPIC;
mfp.xExt = mfp.yExt = 0; /* FIXME ? */
hdcScreen = GetDC(NULL);
mfp.xExt = MulDiv(width, HIMETRIC_INCHES, GetDeviceCaps(hdcScreen, LOGPIXELSX));
mfp.yExt = MulDiv(label_offset + text_size.cy, HIMETRIC_INCHES, GetDeviceCaps(hdcScreen, LOGPIXELSY));
ReleaseDC(NULL, hdcScreen);
mfp.hMF = CloseMetaFile(hdc);
DeleteObject(font);
if( !mfp.hMF )