diff --git a/reactos/dll/win32/uxtheme/draw.c b/reactos/dll/win32/uxtheme/draw.c index 003cf20ff10..73b9615d1f9 100644 --- a/reactos/dll/win32/uxtheme/draw.c +++ b/reactos/dll/win32/uxtheme/draw.c @@ -1609,12 +1609,12 @@ HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc, int iPartId } else { /* otherwise, try to determine content rect from the background type and props */ int bgtype = BT_BORDERFILL; - memcpy(pContentRect, pBoundingRect, sizeof(RECT)); + *pContentRect = *pBoundingRect; GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype); if(bgtype == BT_BORDERFILL) { int bordersize = 1; - + GetThemeInt(hTheme, iPartId, iStateId, TMT_BORDERSIZE, &bordersize); InflateRect(pContentRect, -bordersize, -bordersize); } else if ((bgtype == BT_IMAGEFILE) @@ -1657,12 +1657,12 @@ HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId, } else { /* otherwise, try to determine content rect from the background type and props */ int bgtype = BT_BORDERFILL; - memcpy(pExtentRect, pContentRect, sizeof(RECT)); + *pExtentRect = *pContentRect; GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype); if(bgtype == BT_BORDERFILL) { int bordersize = 1; - + GetThemeInt(hTheme, iPartId, iStateId, TMT_BORDERSIZE, &bordersize); InflateRect(pExtentRect, bordersize, bordersize); } else if ((bgtype == BT_IMAGEFILE) diff --git a/reactos/dll/win32/uxtheme/metric.c b/reactos/dll/win32/uxtheme/metric.c index 1f8b069e9f5..6f8519eb2c2 100644 --- a/reactos/dll/win32/uxtheme/metric.c +++ b/reactos/dll/win32/uxtheme/metric.c @@ -135,7 +135,7 @@ HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf) case TMT_MSGBOXFONT: font = &ncm.lfMessageFont; break; default: FIXME("Unknown FontID: %d\n", iFontID); break; } - if(font) CopyMemory(plf, font, sizeof(LOGFONTW)); + if(font) *plf = *font; else hr = STG_E_INVALIDPARAMETER; } return hr; diff --git a/reactos/dll/win32/uxtheme/msstyles.c b/reactos/dll/win32/uxtheme/msstyles.c index f1577fbec4b..d0fbb11c7cd 100644 --- a/reactos/dll/win32/uxtheme/msstyles.c +++ b/reactos/dll/win32/uxtheme/msstyles.c @@ -141,7 +141,7 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST } pszSizes = (LPWSTR)LoadResource(hTheme, hrsc); - /* Validate requested color against whats available from the theme */ + /* Validate requested color against what's available from the theme */ if(pszColorName) { tmp = pszColors; while(*tmp) { @@ -155,7 +155,7 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST else pszSelectedColor = pszColors; /* Use the default color */ - /* Validate requested size against whats available from the theme */ + /* Validate requested size against what's available from the theme */ if(pszSizeName) { tmp = pszSizes; while(*tmp) { @@ -751,27 +751,27 @@ static BOOL parse_handle_nonclient_font (struct PARSENONCLIENTSTATE* state, switch (iPropertyId) { case TMT_CAPTIONFONT: - memcpy (&state->metrics.lfCaptionFont, &font, sizeof (LOGFONTW)); + state->metrics.lfCaptionFont = font; state->metricsDirty = TRUE; break; case TMT_SMALLCAPTIONFONT: - memcpy (&state->metrics.lfSmCaptionFont, &font, sizeof (LOGFONTW)); + state->metrics.lfSmCaptionFont = font; state->metricsDirty = TRUE; break; case TMT_MENUFONT: - memcpy (&state->metrics.lfMenuFont, &font, sizeof (LOGFONTW)); + state->metrics.lfMenuFont = font; state->metricsDirty = TRUE; break; case TMT_STATUSFONT: - memcpy (&state->metrics.lfStatusFont, &font, sizeof (LOGFONTW)); + state->metrics.lfStatusFont = font; state->metricsDirty = TRUE; break; case TMT_MSGBOXFONT: - memcpy (&state->metrics.lfMessageFont, &font, sizeof (LOGFONTW)); + state->metrics.lfMessageFont = font; state->metricsDirty = TRUE; break; case TMT_ICONTITLEFONT: - memcpy (&state->iconTitleFont, &font, sizeof (LOGFONTW)); + state->iconTitleFont = font; state->metricsDirty = TRUE; break; } @@ -1347,10 +1347,10 @@ HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect) LPCWSTR lpCur = tp->lpValue; LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen; - MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, (int*)&pRect->left); - MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, (int*)&pRect->top); - MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, (int*)&pRect->right); - if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, (int*)&pRect->bottom)) { + MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->left); + MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->top); + MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->right); + if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->bottom)) { TRACE("Could not parse rect property\n"); return E_PROP_ID_UNSUPPORTED; } diff --git a/reactos/dll/win32/uxtheme/uxtheme.rbuild b/reactos/dll/win32/uxtheme/uxtheme.rbuild index ce8d38d1749..38b1f7b9c6b 100644 --- a/reactos/dll/win32/uxtheme/uxtheme.rbuild +++ b/reactos/dll/win32/uxtheme/uxtheme.rbuild @@ -1,5 +1,6 @@ + . @@ -7,13 +8,6 @@ 0x600 0x600 - wine - user32 - gdi32 - advapi32 - kernel32 - ntdll - msimg32 draw.c main.c metric.c @@ -24,4 +18,12 @@ uxini.c version.rc uxtheme.spec + wine + user32 + gdi32 + advapi32 + kernel32 + msimg32 + ntdll +