CDiscreteTransition 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 CDiscreteTransition Class.

Encapsulates a discrete transition.

class CDiscreteTransition : public CBaseTransition;  

Public Constructors

NameDescription
CDiscreteTransition::CDiscreteTransitionConstructs a discrete transition object and initializes its parameters.

Public Methods

NameDescription
CDiscreteTransition::CreateCalls the transition library to create encapsulated transition COM object. (Overrides CBaseTransition::Create.)

Public Data Members

NameDescription
CDiscreteTransition::m_dblFinalValueThe value of the animation variable at the end of the transition.
CDiscreteTransition::m_delayThe amount of time by which to delay the instantaneous switch to the final value.
CDiscreteTransition::m_holdThe amount of time by which to hold the variable at its final value.

During a discrete transition, the animation variable remains at the initial value for a specified delay time, then switches instantaneously to a specified final value and remains at that value for a given hold time. Because all transitions are cleared automatically, it's recommended to allocated them using operator new. The encapsulated IUIAnimationTransition COM object is created by CAnimationController::AnimateGroup, until then it's NULL. Changing member variables after creation of this COM object has no effect.

CObject

CBaseTransition

CDiscreteTransition

Header: afxanimationcontroller.h

Constructs a discrete transition object and initializes its parameters.

CDiscreteTransition(
    UI_ANIMATION_SECONDS delay,  
    DOUBLE dblFinalValue,  
    UI_ANIMATION_SECONDS hold);

Parameters

delay
The amount of time by which to delay the instantaneous switch to the final value.

dblFinalValue
The value of the animation variable at the end of the transition.

hold
The amount of time by which to hold the variable at its final value.

Calls the transition library to create encapsulated transition COM object.

virtual BOOL Create(
    IUIAnimationTransitionLibrary* pLibrary,  
    IUIAnimationTransitionFactory* */);

Parameters

pLibrary
A pointer to transition library, which is responsible for creation of standard transitions.

Return Value

TRUE if transition is created successfully; otherwise FALSE.

The value of the animation variable at the end of the transition.

DOUBLE m_dblFinalValue;  

The amount of time by which to delay the instantaneous switch to the final value.

UI_ANIMATION_SECONDS m_delay;  

The amount of time by which to hold the variable at its final value.

UI_ANIMATION_SECONDS m_hold;  

Classes

Show: