[uxtheme]

- Add an awful hack to prevent creating a LOGFONTW with a positive height that makes ros nuts

svn path=/branches/GSoC_2011/ThemesSupport/; revision=53295
This commit is contained in:
Giannis Adamopoulos 2011-08-18 10:46:31 +00:00
parent e4d0ea5330
commit 5fb9d5fe3b

View file

@ -1257,6 +1257,13 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpCur, LPCWSTR lpEnd,
*lpValEnd = lpCur;
return E_PROP_ID_UNSUPPORTED;
}
if(pointSize > 0)
{
HDC hdc = GetDC(0);
pointSize = -MulDiv(pointSize, GetDeviceCaps(hdc, LOGPIXELSY), 72);
ReleaseDC(0, hdc);
}
pFont->lfHeight = pointSize;
pFont->lfWeight = FW_REGULAR;
pFont->lfCharSet = DEFAULT_CHARSET;