HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
rc = btnPtr->rect;
- CopyRect (&rcArrow, &rc);
+ rcArrow = rc;
/* separator - doesn't send NM_CUSTOMDRAW */
if (btnPtr->fsStyle & BTNS_SEP) {
/* 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)
/* calculate text position */
if (lpText)
{
- rcText.left += GetSystemMetrics(SM_CXEDGE);
- rcText.right -= GetSystemMetrics(SM_CXEDGE);
+ InflateRect(&rcText, -GetSystemMetrics(SM_CXEDGE), 0);
if (dwStyle & TBSTYLE_LIST)
{
rcText.left += infoPtr->nBitmapWidth + infoPtr->iListGap + 2;
if (btnPtr->fsState & TBSTATE_HIDDEN)
{
SetRectEmpty (&btnPtr->rect);
+ TOOLBAR_TooltipSetRect(infoPtr, btnPtr);
continue;
}
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;
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 */