CAnimationTimerEventHandler Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CAnimationTimerEventHandler Class.
Implements a callback, which is called by the Animation API when timing events occur.
class CAnimationTimerEventHandler : public CUIAnimationTimerEventHandlerBase<CAnimationTimerEventHandler>;
Public Methods
| Name | Description |
|---|---|
| CAnimationTimerEventHandler::CreateInstance | Creates an instance of CAnimationTimerEventHandler callback. |
| CAnimationTimerEventHandler::OnPostUpdate | Handles events that occur after an animation update is finished. (Overrides CUIAnimationTimerEventHandlerBase::OnPostUpdate.) |
| CAnimationTimerEventHandler::OnPreUpdate | Handles events that occur before an animation update begins. (Overrides CUIAnimationTimerEventHandlerBase::OnPreUpdate.) |
| CAnimationTimerEventHandler::OnRenderingTooSlow | Handles events that occur when the rendering frame rate for an animation falls below the minimum desirable frame rate. (Overrides CUIAnimationTimerEventHandlerBase::OnRenderingTooSlow.) |
| CAnimationTimerEventHandler::SetAnimationController | Stores a pointer to animation controller to route events. |
This event handler is created and passed to IUIAnimationTimer::SetTimerEventHandler when you call CAnimationController::EnableAnimationTimerEventHandler.
CUIAnimationCallbackBase
CUIAnimationTimerEventHandlerBase
CAnimationTimerEventHandler
Header: afxanimationcontroller.h
Creates an instance of CAnimationTimerEventHandler callback.
static COM_DECLSPEC_NOTHROW HRESULT CreateInstance(
CAnimationController* pAnimationController,
IUIAnimationTimerEventHandler** ppTimerEventHandler);
Parameters
pAnimationController
A pointer to animation controller, which will receive events.
ppTimerEventHandler
Return Value
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Handles events that occur after an animation update is finished.
IFACEMETHOD(OnPostUpdate)();
Return Value
S_OK if the method succeeds; otherwise E_FAIL.
Handles events that occur before an animation update begins.
IFACEMETHOD(OnPreUpdate)();
Return Value
S_OK if the method succeeds; otherwise E_FAIL.
Handles events that occur when the rendering frame rate for an animation falls below the minimum desirable frame rate.
IFACEMETHOD(OnRenderingTooSlow)(UINT32 fps);
Parameters
fps
Return Value
S_OK if the method succeeds; otherwise E_FAIL.
Stores a pointer to animation controller to route events.
void SetAnimationController(CAnimationController* pAnimationController);
Parameters
pAnimationController
A pointer to animation controller, which will receive events.