mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[MSGINA] Redraw only the animation bar scroll (#2518)
Invalidating and updating the whole window is a waste of computation resources and may cause certain controls notably the text string control to flicker. So instead, just invalidate the specific portion of the client area which is the animation bar.
This commit is contained in:
parent
a5a426f867
commit
28e277b65f
1 changed files with 6 additions and 2 deletions
|
@ -36,6 +36,7 @@ typedef struct _DLG_DATA
|
|||
PGINA_CONTEXT pgContext;
|
||||
HBITMAP hLogoBitmap;
|
||||
HBITMAP hBarBitmap;
|
||||
HWND hWndBarCtrl;
|
||||
DWORD BarCounter;
|
||||
DWORD LogoWidth;
|
||||
DWORD LogoHeight;
|
||||
|
@ -197,6 +198,9 @@ StatusDialogProc(
|
|||
{
|
||||
ERR("SetTimer(IDT_BAR) failed: %d\n", GetLastError());
|
||||
}
|
||||
|
||||
/* Get the animation bar control */
|
||||
pDlgData->hWndBarCtrl = GetDlgItem(hwndDlg, IDC_BAR);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -210,8 +214,8 @@ StatusDialogProc(
|
|||
* We can divide 413 by 7 without remainder
|
||||
*/
|
||||
pDlgData->BarCounter = (pDlgData->BarCounter + 7) % pDlgData->BarWidth;
|
||||
InvalidateRect(hwndDlg, NULL, FALSE);
|
||||
UpdateWindow(hwndDlg);
|
||||
InvalidateRect(pDlgData->hWndBarCtrl, NULL, FALSE);
|
||||
UpdateWindow(pDlgData->hWndBarCtrl);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue