Author: gadamopoulos Date: Thu Aug 18 10:46:31 2011 New Revision: 53295
URL: http://svn.reactos.org/svn/reactos?rev=53295&view=rev Log: [uxtheme] - Add an awful hack to prevent creating a LOGFONTW with a positive height that makes ros nuts
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/msstyles.c
Modified: branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/msstyles.c URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2011/ThemesSupport/dll/win3... ============================================================================== --- branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/msstyles.c [iso-8859-1] (original) +++ branches/GSoC_2011/ThemesSupport/dll/win32/uxtheme/msstyles.c [iso-8859-1] Thu Aug 18 10:46:31 2011 @@ -1257,6 +1257,13 @@ *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;