diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 9e220254db..17900f8352 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 2839539372..b84e978dba 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++; }