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
dlls/comctl32

View File

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