Replaced calls to HEADER_Refresh with InvalidateRect.

This commit is contained in:
Chris Morgan 2000-06-04 01:34:31 +00:00 committed by Alexandre Julliard
parent 02746e8efe
commit 3cbc16854f
1 changed files with 11 additions and 32 deletions

View File

@ -498,7 +498,6 @@ HEADER_DeleteItem (HWND hwnd, WPARAM wParam)
{
HEADER_INFO *infoPtr = HEADER_GetInfoPtr(hwnd);
INT iItem = (INT)wParam;
HDC hdc;
TRACE("[iItem=%d]\n", iItem);
@ -539,9 +538,7 @@ HEADER_DeleteItem (HWND hwnd, WPARAM wParam)
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
return TRUE;
}
@ -711,7 +708,6 @@ HEADER_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
HDITEMA *phdi = (HDITEMA*)lParam;
INT nItem = (INT)wParam;
HEADER_ITEM *lpItem;
HDC hdc;
INT len;
if ((phdi == NULL) || (nItem < 0))
@ -789,9 +785,7 @@ HEADER_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
return nItem;
}
@ -804,7 +798,6 @@ HEADER_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
HDITEMW *phdi = (HDITEMW*)lParam;
INT nItem = (INT)wParam;
HEADER_ITEM *lpItem;
HDC hdc;
INT len;
if ((phdi == NULL) || (nItem < 0))
@ -876,9 +869,7 @@ HEADER_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
return nItem;
}
@ -935,7 +926,6 @@ HEADER_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
HDITEMA *phdi = (HDITEMA*)lParam;
INT nItem = (INT)wParam;
HEADER_ITEM *lpItem;
HDC hdc;
if (phdi == NULL)
return FALSE;
@ -985,9 +975,8 @@ HEADER_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam)
HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGEDA, nItem);
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
return TRUE;
}
@ -1000,7 +989,6 @@ HEADER_SetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
HDITEMW *phdi = (HDITEMW*)lParam;
INT nItem = (INT)wParam;
HEADER_ITEM *lpItem;
HDC hdc;
if (phdi == NULL)
return FALSE;
@ -1050,9 +1038,8 @@ HEADER_SetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam)
HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGEDA, nItem);
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
return TRUE;
}
@ -1264,9 +1251,7 @@ HEADER_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
}
}
@ -1299,9 +1284,7 @@ HEADER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->iHotItem = nItem;
else
infoPtr->iHotItem = -1;
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
}
if (infoPtr->bCaptured) {
@ -1329,9 +1312,7 @@ HEADER_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->iMoveItem);
}
HEADER_SetItemBounds (hwnd);
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
}
else {
hdc = GetDC (hwnd);
@ -1442,9 +1423,7 @@ HEADER_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->bRectsValid = FALSE;
if (lParam) {
hdc = GetDC (hwnd);
HEADER_Refresh (hwnd, hdc);
ReleaseDC (hwnd, hdc);
InvalidateRect(hwnd, NULL, FALSE);
}
return 0;