Commit 373f8ff1 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

uxtheme: Remove superflous casts.

parent 83c4ae56
...@@ -1177,8 +1177,8 @@ static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state, ...@@ -1177,8 +1177,8 @@ static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state,
+ (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0); + (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0);
/* Init some vars */ /* Init some vars */
OuterPen = InnerPen = (HPEN)GetStockObject(NULL_PEN); OuterPen = InnerPen = GetStockObject(NULL_PEN);
SavePen = (HPEN)SelectObject(hdc, InnerPen); SavePen = SelectObject(hdc, InnerPen);
spx = spy = epx = epy = 0; /* Satisfy the compiler... */ spx = spy = epx = epy = 0; /* Satisfy the compiler... */
/* Determine the colors of the edges */ /* Determine the colors of the edges */
...@@ -1373,8 +1373,8 @@ static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state, ...@@ -1373,8 +1373,8 @@ static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state,
HPEN hpsave; HPEN hpsave;
HPEN hp = get_edge_pen ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL, HPEN hp = get_edge_pen ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL,
theme, part, state); theme, part, state);
hbsave = (HBRUSH)SelectObject(hdc, hb); hbsave = SelectObject(hdc, hb);
hpsave = (HPEN)SelectObject(hdc, hp); hpsave = SelectObject(hdc, hp);
Polygon(hdc, Points, 4); Polygon(hdc, Points, 4);
SelectObject(hdc, hbsave); SelectObject(hdc, hbsave);
SelectObject(hdc, hpsave); SelectObject(hdc, hpsave);
...@@ -1426,8 +1426,8 @@ static HRESULT draw_rect_edge (HDC hdc, HTHEME theme, int part, int state, ...@@ -1426,8 +1426,8 @@ static HRESULT draw_rect_edge (HDC hdc, HTHEME theme, int part, int state,
&& !(uFlags & (BF_FLAT|BF_MONO)) ) ? E_FAIL : S_OK; && !(uFlags & (BF_FLAT|BF_MONO)) ) ? E_FAIL : S_OK;
/* Init some vars */ /* Init some vars */
LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = (HPEN)GetStockObject(NULL_PEN); LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = GetStockObject(NULL_PEN);
SavePen = (HPEN)SelectObject(hdc, LTInnerPen); SavePen = SelectObject(hdc, LTInnerPen);
/* Determine the colors of the edges */ /* Determine the colors of the edges */
if(uFlags & BF_MONO) if(uFlags & BF_MONO)
......
...@@ -132,14 +132,14 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST ...@@ -132,14 +132,14 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST
hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
goto invalid_theme; goto invalid_theme;
} }
pszColors = (LPWSTR)LoadResource(hTheme, hrsc); pszColors = LoadResource(hTheme, hrsc);
if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szSizeNamesResource))) { if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szSizeNamesResource))) {
TRACE("Size names resource not found\n"); TRACE("Size names resource not found\n");
hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
goto invalid_theme; goto invalid_theme;
} }
pszSizes = (LPWSTR)LoadResource(hTheme, hrsc); pszSizes = LoadResource(hTheme, hrsc);
/* Validate requested color against what's available from the theme */ /* Validate requested color against what's available from the theme */
if(pszColorName) { if(pszColorName) {
...@@ -298,7 +298,7 @@ static PUXINI_FILE MSSTYLES_GetActiveThemeIni(PTHEME_FILE tf) ...@@ -298,7 +298,7 @@ static PUXINI_FILE MSSTYLES_GetActiveThemeIni(PTHEME_FILE tf)
TRACE("FILERESNAMES map not found\n"); TRACE("FILERESNAMES map not found\n");
return NULL; return NULL;
} }
tmp = (LPWSTR)LoadResource(tf->hTheme, hrsc); tmp = LoadResource(tf->hTheme, hrsc);
dwResourceIndex = (dwSizeCount * dwColorNum) + dwSizeNum; dwResourceIndex = (dwSizeCount * dwColorNum) + dwSizeNum;
for(i=0; i < dwResourceIndex; i++) { for(i=0; i < dwResourceIndex; i++) {
tmp += lstrlenW(tmp)+1; tmp += lstrlenW(tmp)+1;
......
...@@ -122,7 +122,7 @@ static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue, ...@@ -122,7 +122,7 @@ static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue,
WCHAR cNull = '\0'; WCHAR cNull = '\0';
nBytesToAlloc = dwUnExpDataLen; nBytesToAlloc = dwUnExpDataLen;
szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc); szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
RegQueryValueExW (hKey, lpszValue, 0, NULL, (LPBYTE)szData, &nBytesToAlloc); RegQueryValueExW (hKey, lpszValue, 0, NULL, (LPBYTE)szData, &nBytesToAlloc);
dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1); dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1);
dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen); dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
...@@ -131,7 +131,7 @@ static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue, ...@@ -131,7 +131,7 @@ static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue,
else else
{ {
nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR); nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR);
szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc ); szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
lstrcpyW(szData, pvData); lstrcpyW(szData, pvData);
dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, MAX_PATH ); dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, MAX_PATH );
if (dwExpDataLen > MAX_PATH) dwRet = ERROR_MORE_DATA; if (dwExpDataLen > MAX_PATH) dwRet = ERROR_MORE_DATA;
......
...@@ -68,7 +68,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) { ...@@ -68,7 +68,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
TRACE("Loading resource INI %s\n", debugstr_w(lpName)); TRACE("Loading resource INI %s\n", debugstr_w(lpName));
if((hrsc = FindResourceW(hTheme, lpName, szTextFileResource))) { if((hrsc = FindResourceW(hTheme, lpName, szTextFileResource))) {
if(!(lpThemesIni = (LPCWSTR)LoadResource(hTheme, hrsc))) { if(!(lpThemesIni = LoadResource(hTheme, hrsc))) {
TRACE("%s resource not found\n", debugstr_w(lpName)); TRACE("%s resource not found\n", debugstr_w(lpName));
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment