BCGSuite for MFC

Detailed Description

CBCGPAnimationManager wraps functionality of Windows IUIAnimationManager interface.

Using this class, a developer can add animation support in few lines of code:

just derive any class from CBCGPAnimationManager, call StartAnimation() and override OnAnimationValueChanged() virtual method.

The following animation types are supported:

  • Legacy: timer-based animation. If an application is launched under the OS where Animation Manager is not supported (for example Windows XP or Windows Vista without SP1), CBCGPAnimationManager will automatically use this animation type.
  • Accelerate / Decelerate
  • Cubic
  • Linear
  • Smooth Stop
  • Parabolic from Acceleration

The animation support was added to the following product components:

  • Chart control (series appearance).
  • Gauge (pointer smooth moving).
  • Page transition manager (used in the property sheets and Ribbon backstage views).
  • WinUI Tiles (tile content changing effect).
  • Tasks pane and toolbox (page changing effect).

AnimationManagerDemo sample shows how to add the animation support to your own class.


class CMyClass : public CObject
virtual void OnAnimationValueChanged(double dblOldValue, double dblNewValue)
TRACE(_T("The current animation value is: %f\n"), dblNewValue);
virtual void OnAnimationFinished()
TRACE(_T("The animation is finished.\n"));
CMyClass myObject;
// Start animation. The values range is: 0 - 100, duration 2 seconds,
// animation type is "Accelerate / Decelerate":
+ Inheritance diagram for CBCGPAnimationManager:

Public Types

enum  BCGPAnimationType

Public Member Functions

 CBCGPAnimationManagerDefault constructor.
 GetAnimatedValueGets current animated value.
 GetAnimationDurationGets animation duration.
 GetLastAnimationErrorGets the animation error returned by recent call to Windows Animation API.
 IsAnimatedChecks if animation is running.
 StartAnimationStarts an animation.
 StartFlashAnimationStarts "flash" animation.
 StopAnimationStops an animation.

Static Public Member Functions

 IsAnimationSupportedByOSChecks if animation is supported by OS.

Protected Member Functions

 OnAnimationFinishedCalled by the framework when an animation is finished.
 OnAnimationIdleCalled by the framework in an animation idle time.
 OnAnimationValueChangedCalled by the framewrok when an animation value is changed.