uxtheme: Assign to structs instead of using memcpy.

This commit is contained in:
Andrew Talbot 2008-03-19 21:50:43 +00:00 committed by Alexandre Julliard
parent 6e1829fc62
commit 7abeb20490
2 changed files with 10 additions and 10 deletions

View File

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

View File

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