From de3e06a745e38df5d04ade13fb95e62dc4082f2f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 9 Dec 2009 12:04:08 +0100 Subject: [PATCH] uxtheme: Fix some pointer cast warnings on 64-bit. --- dlls/uxtheme/draw.c | 5 ++--- dlls/uxtheme/system.c | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 9e220254db3..17900f8352b 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -56,7 +56,7 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags) 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 @@ BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd) 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; diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 28395393729..b84e978dba8 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -393,8 +393,7 @@ static void UXTHEME_RestoreSystemMetrics(void) 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 @@ static void UXTHEME_SaveSystemMetrics(void) 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++; }