mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
[COMCTL32] Fix header redraw glitches when resizing (#6799)
Fixes COMCTL32 headers from being garbage text when resizing while drawn off screen. - Invalidate header item rect before scrolling to prevent the divider from being redrawn over and over. - Invalidate header item text through adding flag SW_INVALIDATE to ScrollWindowEx call to prevent the text from being redrawn over and over. CORE-19404
This commit is contained in:
parent
b8e50f787d
commit
ab72bc06d6
1 changed files with 8 additions and 0 deletions
|
@ -1948,13 +1948,21 @@ HEADER_MouseMove (HEADER_INFO *infoPtr, LPARAM lParam)
|
|||
|
||||
if (nWidth < 0) nWidth = 0;
|
||||
infoPtr->items[infoPtr->iMoveItem].cxy = nWidth;
|
||||
#ifdef __REACTOS__
|
||||
InvalidateRect(infoPtr->hwndSelf, &lpItem->rect, FALSE);
|
||||
#endif
|
||||
HEADER_SetItemBounds(infoPtr);
|
||||
|
||||
GetClientRect(infoPtr->hwndSelf, &rcClient);
|
||||
rcScroll = rcClient;
|
||||
rcScroll.left = lpItem->rect.left + nOldWidth;
|
||||
#ifdef __REACTOS__
|
||||
ScrollWindowEx(infoPtr->hwndSelf, nWidth - nOldWidth, 0, &rcScroll, &rcClient,
|
||||
NULL, NULL, SW_INVALIDATE);
|
||||
#else
|
||||
ScrollWindowEx(infoPtr->hwndSelf, nWidth - nOldWidth, 0, &rcScroll, &rcClient, NULL, NULL, 0);
|
||||
InvalidateRect(infoPtr->hwndSelf, &lpItem->rect, FALSE);
|
||||
#endif
|
||||
UpdateWindow(infoPtr->hwndSelf);
|
||||
|
||||
HEADER_SendNotifyWithIntFieldT(infoPtr, HDN_ITEMCHANGEDW, infoPtr->iMoveItem, HDI_WIDTH, nWidth);
|
||||
|
|
Loading…
Reference in a new issue