[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); TRACE("(%p,0x%08x\n", hwnd, dwFlags);
res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled), res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
(HANDLE)(dwFlags|0x80000000)); UlongToHandle(dwFlags|0x80000000));
/* 0x80000000 serves as a "flags set" flag */ /* 0x80000000 serves as a "flags set" flag */
if (!res) if (!res)
return HRESULT_FROM_WIN32(GetLastError()); return HRESULT_FROM_WIN32(GetLastError());
@ -74,8 +74,7 @@ BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
DWORD dwDialogTextureFlags; DWORD dwDialogTextureFlags;
TRACE("(%p)\n", hwnd); TRACE("(%p)\n", hwnd);
dwDialogTextureFlags = (DWORD)GetPropW (hwnd, dwDialogTextureFlags = HandleToUlong( GetPropW( hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled) ));
(LPCWSTR)MAKEINTATOM(atDialogThemeEnabled));
if (dwDialogTextureFlags == 0) if (dwDialogTextureFlags == 0)
/* Means EnableThemeDialogTexture wasn't called for this dialog */ /* Means EnableThemeDialogTexture wasn't called for this dialog */
return TRUE; 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])); lstrcpynW(part, comp, sizeof(part)/sizeof(part[0]));
comp = tmp; comp = tmp;
/* now get the state */ /* now get the state */
*strchrW(comp, ')') = 0; tmp = strchrW(comp, ')');
if (!tmp)
return FALSE;
*tmp = 0;
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0])); lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
} }
else { else {
@ -378,7 +381,10 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME); lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
comp = tmp; comp = tmp;
/* now get the state */ /* now get the state */
*strchrW(comp, ')') = 0; tmp = strchrW(comp, ')');
if (!tmp)
return FALSE;
*tmp = 0;
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0])); lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
} }
else { else {
@ -1087,7 +1093,7 @@ static BOOL prepare_alpha (HBITMAP bmp, BOOL* hasAlpha)
*hasAlpha = TRUE; *hasAlpha = TRUE;
p = dib.dsBm.bmBits; 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 */ /* AlphaBlend() wants premultiplied alpha, so do that now */
while (n-- > 0) while (n-- > 0)
{ {

View file

@ -393,8 +393,7 @@ static void UXTHEME_RestoreSystemMetrics(void)
if (RegQueryValueExW (hKey, bsp->keyName, 0, if (RegQueryValueExW (hKey, bsp->keyName, 0,
&type, (LPBYTE)&value, &count) == ERROR_SUCCESS) &type, (LPBYTE)&value, &count) == ERROR_SUCCESS)
{ {
SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value, SystemParametersInfoW (bsp->spiSet, 0, UlongToPtr(value), SPIF_UPDATEINIFILE);
SPIF_UPDATEINIFILE);
} }
bsp++; bsp++;
@ -445,9 +444,7 @@ static void UXTHEME_SaveSystemMetrics(void)
DWORD value; DWORD value;
SystemParametersInfoW (bsp->spiGet, 0, &value, 0); SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value, SystemParametersInfoW (bsp->spiSet, 0, UlongToPtr(value), SPIF_UPDATEINIFILE);
SPIF_UPDATEINIFILE);
bsp++; bsp++;
} }