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