For animations, you must use Direct2D (it uses GPU, a lot smoother than GDI/GDI+, using CPU), with a Device Context for recent OS as explained at : https://learn.microsoft.com/en-us/windows/win32/direct2d/devices-and-device-contexts
It seems complicated the 1rst time, but afterwards you just have to copy/paste all same initializations, and the main drawing code is inside BeginDraw/EndDraw.
You can see MS SDK samples like SimplePathAnimationSample or TextAnimationSample at https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/Win7Samples/multimedia/Direct2D
Animation is done "automatically" with InvalidateRect(m_hwnd, NULL, FALSE);
which generates frames at screen refresh rate (60 Hz on my PC)
For a lot of bitmaps, an efficient way is with ID2D1SpriteBatch
(I used sprites in some WinUI 3 / C# test samples (easy to convert into C++)
like WinUI3_SwapChainPanel_Direct2D or WinUI3_Direct2D_Composition )