CAnimationVariableChangeHandler 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 CAnimationVariableChangeHandler Class.
Implements a callback, which is called by the Animation API when the value of an animation variable changes.
class CAnimationVariableChangeHandler : public CUIAnimationVariableChangeHandlerBase<CAnimationVariableChangeHandler>;
Name | Description |
---|---|
CAnimationVariableChangeHandler::CAnimationVariableChangeHandler |
Constructs a CAnimationVariableChangeHandler object. |
Name | Description |
---|---|
CAnimationVariableChangeHandler::CreateInstance |
Creates an instance of CAnimationVariableChangeHandler object. |
CAnimationVariableChangeHandler::OnValueChanged | Called when a value of an animation variable has changed. (Overrides CUIAnimationVariableChangeHandlerBase::OnValueChanged .) |
CAnimationVariableChangeHandler::SetAnimationController | Stores a pointer to animation controller to route events. |
This event handler is created and passed to IUIAnimationVariable::SetVariableChangeHandler
method, when you call CAnimationVariable::EnableValueChangedEvent
or CAnimationBaseObject::EnableValueChangedEvent
(which enables this event for all animation variables encapsulated in an animation object).
CUIAnimationCallbackBase
CUIAnimationVariableChangeHandlerBase
CAnimationVariableChangeHandler
Header: afxanimationcontroller.h
Called when a value of an animation variable has changed.
IFACEMETHOD(OnValueChanged) (
__in IUIAnimationStoryboard* storyboard,
__in IUIAnimationVariable* variable,
__in DOUBLE newValue,
__in DOUBLE previousValue);
storyboard
The storyboard that is animating the variable.
variable
The animation variable that was updated.
newValue
The new value.
previousValue
The previous value.
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Stores a pointer to animation controller to route events.
void SetAnimationController(CAnimationController* pAnimationController);
pAnimationController
A pointer to animation controller, which will receive events.