[ros-diffs] [cwittich] 45932: [UXTHEME] sync uxtheme to wine 1.1.40

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sat Mar 6 13:53:36 CET 2010


Author: cwittich
Date: Sat Mar  6 13:53:36 2010
New Revision: 45932

URL: http://svn.reactos.org/svn/reactos?rev=45932&view=rev
Log:
[UXTHEME]
sync uxtheme to wine 1.1.40

Modified:
    trunk/reactos/dll/win32/uxtheme/draw.c
    trunk/reactos/dll/win32/uxtheme/msstyles.c
    trunk/reactos/dll/win32/uxtheme/system.c

Modified: trunk/reactos/dll/win32/uxtheme/draw.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?rev=45932&r1=45931&r2=45932&view=diff
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Sat Mar  6 13:53:36 2010
@@ -56,7 +56,7 @@
 
     TRACE("(%p,0x%08x\n", hwnd, dwFlags);
     res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled), 
-        (HANDLE)(dwFlags|0x80000000)); 
+                    UlongToHandle(dwFlags|0x80000000));
         /* 0x80000000 serves as a "flags set" flag */
     if (!res)
           return HRESULT_FROM_WIN32(GetLastError());
@@ -74,8 +74,7 @@
     DWORD dwDialogTextureFlags;
     TRACE("(%p)\n", hwnd);
 
-    dwDialogTextureFlags = (DWORD)GetPropW (hwnd, 
-        (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled));
+    dwDialogTextureFlags = HandleToUlong( GetPropW( hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled) ));
     if (dwDialogTextureFlags == 0) 
         /* Means EnableThemeDialogTexture wasn't called for this dialog */
         return TRUE;

Modified: trunk/reactos/dll/win32/uxtheme/msstyles.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/msstyles.c?rev=45932&r1=45931&r2=45932&view=diff
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/msstyles.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/msstyles.c [iso-8859-1] Sat Mar  6 13:53:36 2010
@@ -364,7 +364,10 @@
             lstrcpynW(part, comp, sizeof(part)/sizeof(part[0]));
             comp = tmp;
             /* now get the state */
-            *strchrW(comp, ')') = 0;
+            tmp = strchrW(comp, ')');
+            if (!tmp)
+                return FALSE;
+            *tmp = 0;
             lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
         }
         else {
@@ -378,7 +381,10 @@
             lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
             comp = tmp;
             /* now get the state */
-            *strchrW(comp, ')') = 0;
+            tmp = strchrW(comp, ')');
+            if (!tmp)
+                return FALSE;
+            *tmp = 0;
             lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
         }
         else {
@@ -1087,7 +1093,7 @@
 
     *hasAlpha = TRUE;
     p = dib.dsBm.bmBits;
-    n = abs(dib.dsBmih.biHeight) * dib.dsBmih.biWidth;
+    n = dib.dsBmih.biHeight * dib.dsBmih.biWidth;
     /* AlphaBlend() wants premultiplied alpha, so do that now */
     while (n-- > 0)
     {

Modified: trunk/reactos/dll/win32/uxtheme/system.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c?rev=45932&r1=45931&r2=45932&view=diff
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Sat Mar  6 13:53:36 2010
@@ -393,8 +393,7 @@
             if (RegQueryValueExW (hKey, bsp->keyName, 0,
                 &type, (LPBYTE)&value, &count) == ERROR_SUCCESS)
             {
-                SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value,
-                    SPIF_UPDATEINIFILE);
+                SystemParametersInfoW (bsp->spiSet, 0, UlongToPtr(value), SPIF_UPDATEINIFILE);
             }
         
             bsp++;
@@ -445,9 +444,7 @@
         DWORD value;
         
         SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
-        SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value,
-            SPIF_UPDATEINIFILE);
-    
+        SystemParametersInfoW (bsp->spiSet, 0, UlongToPtr(value), SPIF_UPDATEINIFILE);
         bsp++;
     }
     




More information about the Ros-diffs mailing list