comctl32: Avoid using CopyRect() on RECT structs.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e201dcac87
commit
65a2e59a78
|
@ -264,7 +264,7 @@ VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
|
|||
RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL,
|
||||
RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
|
||||
|
||||
CopyRect(&data->last_drag_icon_rect, &rcDragIcon);
|
||||
data->last_drag_icon_rect = rcDragIcon;
|
||||
|
||||
if (nItem >= 0)
|
||||
{
|
||||
|
|
|
@ -3856,9 +3856,8 @@ static void LISTVIEW_MarqueeHighlight(LISTVIEW_INFO *infoPtr, const POINT *coord
|
|||
|
||||
iterator_frameditems_absolute(&old_elems, infoPtr, &infoPtr->marqueeRect);
|
||||
|
||||
CopyRect(&infoPtr->marqueeRect, &rect);
|
||||
|
||||
CopyRect(&infoPtr->marqueeDrawRect, &rect);
|
||||
infoPtr->marqueeRect = rect;
|
||||
infoPtr->marqueeDrawRect = rect;
|
||||
OffsetRect(&infoPtr->marqueeDrawRect, offset->x, offset->y);
|
||||
|
||||
iterator_frameditems_absolute(&new_elems, infoPtr, &infoPtr->marqueeRect);
|
||||
|
|
|
@ -355,7 +355,7 @@ static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc)
|
|||
DrawThemeParentBackground (infoPtr->Self, hdc, NULL);
|
||||
DrawThemeBackground (pdi.theme, hdc, part, 0, &pdi.rect, NULL);
|
||||
SelectClipRgn (hdc, NULL);
|
||||
CopyRect (&pdi.rect, &cntRect);
|
||||
pdi.rect = cntRect;
|
||||
}
|
||||
|
||||
/* compute some drawing parameters */
|
||||
|
|
|
@ -3219,7 +3219,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
|
|||
if (bm.bmWidth < r.right || bm.bmHeight < r.bottom)
|
||||
{
|
||||
hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0));
|
||||
CopyRect(&r, &rzone);
|
||||
r = rzone;
|
||||
if (bm.bmWidth < r.right)
|
||||
{
|
||||
r.left = bm.bmWidth;
|
||||
|
|
|
@ -80,7 +80,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c
|
|||
/*
|
||||
* Give ourselves some space.
|
||||
*/
|
||||
CopyRect (&rectEdit, &cbi->rcItem);
|
||||
rectEdit = cbi->rcItem;
|
||||
InflateRect( &rectEdit, -1, -1 );
|
||||
|
||||
if(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
|
||||
|
@ -187,8 +187,7 @@ static LRESULT paint (HTHEME theme, HWND hwnd, HDC hParamDC, ULONG state)
|
|||
GetClientRect (hwnd, &frameRect);
|
||||
else
|
||||
{
|
||||
CopyRect (&frameRect, &cbi.rcItem);
|
||||
|
||||
frameRect = cbi.rcItem;
|
||||
InflateRect(&frameRect,
|
||||
EDIT_CONTROL_PADDING + COMBO_XBORDERSIZE,
|
||||
EDIT_CONTROL_PADDING + COMBO_YBORDERSIZE);
|
||||
|
|
|
@ -876,7 +876,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
|
|||
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
|
||||
|
||||
rc = btnPtr->rect;
|
||||
CopyRect (&rcArrow, &rc);
|
||||
rcArrow = rc;
|
||||
|
||||
/* separator - doesn't send NM_CUSTOMDRAW */
|
||||
if (btnPtr->fsStyle & BTNS_SEP) {
|
||||
|
@ -929,8 +929,8 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
|
|||
/* copy text & bitmap rects after adjusting for drop-down arrow
|
||||
* so that text & bitmap is centered in the rectangle not containing
|
||||
* the arrow */
|
||||
CopyRect(&rcText, &rc);
|
||||
CopyRect(&rcBitmap, &rc);
|
||||
rcText = rc;
|
||||
rcBitmap = rc;
|
||||
|
||||
/* Center the bitmap horizontally and vertically */
|
||||
if (dwStyle & TBSTYLE_LIST)
|
||||
|
@ -2648,9 +2648,9 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
lpdis->rcItem.right, lpdis->rcItem.bottom);
|
||||
|
||||
/* calculate button and text rectangles */
|
||||
CopyRect (&rcButton, &lpdis->rcItem);
|
||||
rcButton = lpdis->rcItem;
|
||||
InflateRect (&rcButton, -1, -1);
|
||||
CopyRect (&rcText, &rcButton);
|
||||
rcText = rcButton;
|
||||
rcButton.right = rcButton.left + custInfo->tbInfo->nBitmapWidth + 6;
|
||||
rcText.left = rcButton.right + 2;
|
||||
|
||||
|
@ -5550,7 +5550,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
|||
RECT arrowRect;
|
||||
infoPtr->nOldHit = nHit;
|
||||
|
||||
CopyRect(&arrowRect, &btnPtr->rect);
|
||||
arrowRect = btnPtr->rect;
|
||||
arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH);
|
||||
|
||||
/* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */
|
||||
|
|
Loading…
Reference in New Issue