[ros-diffs] [gadamopoulos] 53295: [uxtheme] - Add an awful hack to prevent creating a LOGFONTW with a positive height that makes ros nuts

gadamopoulos at svn.reactos.org gadamopoulos at svn.reactos.org
Thu Aug 18 10:46:31 UTC 2011


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/win32/uxtheme/msstyles.c?rev=53295&r1=53294&r2=53295&view=diff
==============================================================================
--- 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;




More information about the Ros-diffs mailing list