This might be a simpler explanation. I have 2 custom controls that are derived from CWnd. Each of them creates it's own private animation manager, variables, storyboards, etc. so that it can animate it's drawing. All of the animation API code is inside the control, and it works. However, when I do this it doesn't work:
Control1 ctrl1;
Control2 ctrl2;
ctrl1.Animate();
ctrl2.Animate();
In this case I now have 2 animation managers animating at once, even though nothing is shared between them. The result is that usually one of the controls animates fine and the other one doesn't. The one that doesn't work will have no painting notifications, or maybe just one and it seems like the animation variable values are wrong when it does. The results are inconsistent, so it seems like the timing of things is important. It seems like the 2 separate animation managers don't like animating at the same time. I get no errors or bad return codes from any functions.
I'll also point out that I have cases where I have multiple classes that each have their own animation managers that exist simultaneously, and they all work fine. The problem only happens when more than one of these is actually animating at the same time.
https://learn.microsoft.com/en-us/windows/win32/uianimation/scenic-animation-api-overview
This page says, "A single animation manager object typically manages all animations across an application and therefore has global control over all scheduled storyboards." The word "typically" there makes it sound like this is what most users would do, but does it mean that an application can only have one animation manager period? Is having multiple animation managers in a single application not allowed? If so, this will make it much harder for me to use this API.