IDCompositionDevice::CreateAnimation method (dcomp.h)
Creates an animation object that is used to animate one or more scalar properties of one or more Microsoft DirectComposition objects.
Syntax
HRESULT CreateAnimation(
[out] IDCompositionAnimation **animation
);
Parameters
[out] animation
Type: IDCompositionAnimation**
The new animation object. This parameter must not be NULL.
Return value
Type: HRESULT
If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See DirectComposition Error Codes for a list of error codes.
Remarks
A number of DirectComposition object properties can have an animation object as the value of the property. When a property has an animation object as its value, DirectComposition redraws the visual at the refresh rate to reflect the changing value of the property that is being animated.
A newly created animation object does not have any animation segments associated with it. An application must use the methods of the IDCompositionAnimation interface to build an animation function before setting the animation object as the property of another DirectComposition object.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | dcomp.h |
Library | Dcomp.lib |
DLL | Dcomp.dll |