[UXTHEME]

sync uxtheme to wine 1.1.40

svn path=/trunk/; revision=45932
This commit is contained in:
Christoph von Wittich 2010-03-06 12:53:36 +00:00
parent feebaff19f
commit 8fc089778a
3 changed files with 13 additions and 11 deletions

View file

@ -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;

View file

@ -364,7 +364,10 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
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 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
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 @@ static BOOL prepare_alpha (HBITMAP bmp, BOOL* hasAlpha)
*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)
{

View file

@ -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++;
}