Delen via


CAnimationController::CreateKeyframe

Creates a keyframe that depends on transition and adds it to the specified group.

CKeyFrame* CreateKeyframe(
   UINT32 nGroupID,
   CBaseTransition* pTransition
);
CKeyFrame* CreateKeyframe(
   UINT32 nGroupID,
   CBaseKeyFrame* pKeyframe,
   UI_ANIMATION_SECONDS offset = 0.0
);

Parameters

  • nGroupID
    Specifies Group ID for which keyframe is created.

  • pTransition
    A pointer to transition. Keyframe will be inserted to storyboard after this transition.

  • pKeyframe
    A pointer to base keyframe for this keyframe.

  • offset
    Offset in seconds from the base keyframe specified by pKeyframe.

Return Value

A pointer to newly created keyframe if the function succeeds.

Remarks

You can store the returned pointer and base other keyframes on the newly created keyframe (see the second overload). It's possible to begin transitions at keyframes - see CBaseTransition::SetKeyframes. You don't need to delete keyframes created in this way, because they are deleted automatically by animation groups. Be careful when creating keyframes based on other keyframes and transitions and avoid circular references.

Requirements

Header: afxanimationcontroller.h

See Also

Reference

CAnimationController Class