comctl32: header: Don't try to draw items outside the clipping rect.

This commit is contained in:
Mikołaj Zalewski 2006-05-22 22:53:08 +02:00 committed by Alexandre Julliard
parent 64e5779c16
commit b8da6f2751
1 changed files with 4 additions and 2 deletions

View File

@ -466,8 +466,10 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
x = rect.left;
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
x = HEADER_DrawItem (hwnd, hdc, HEADER_OrderToIndex(hwnd,i),
infoPtr->iHotItem == i);
int idx = HEADER_OrderToIndex(hwnd,i);
if (RectVisible(hdc, &infoPtr->items[idx].rect))
HEADER_DrawItem (hwnd, hdc, idx, infoPtr->iHotItem == i);
x = infoPtr->items[idx].rect.right;
}
if ((x <= rect.right) && (infoPtr->uNumItem > 0)) {