IUIAnimationTimer::SetTimerUpdateHandler method (uianimation.h)
Specifies a timer update handler.
Syntax
HRESULT SetTimerUpdateHandler(
[in, optional] IUIAnimationTimerUpdateHandler *updateHandler,
[in] UI_ANIMATION_IDLE_BEHAVIOR idleBehavior
);
Parameters
[in, optional] updateHandler
A timer update handler, or NULL (see Remarks). The specified object must implement the IUIAnimationTimerUpdateHandler interface.
[in] idleBehavior
A member of UI_ANIMATION_IDLE_BEHAVIOR that specifies the behavior of the timer when it is idle.
Return value
If the method succeeds, it returns S_OK. If the update handler is already connected to a timer, this method returns UI_E_TIMER_CLIENT_ALREADY_CONNECTED. Otherwise, it returns an HRESULT error code. See Windows Animation Error Codes for a list of error codes.
Remarks
The timer update handler receives time updates (ticks) from the timer. The timer indicates an update by calling
the IUIAnimationTimerUpdateHandler::OnUpdate
method on the specified handler.
Passing NULL for the updateHandler parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the IUIAnimationManager::Shutdown method.
Examples
For an example, see Update the Animation Manager.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | uianimation.h |
DLL | UIAnimation.dll |