CAnimateCtrl

The CAnimateCtrl class provides the functionality of the Windows common animation control. This control (and therefore the CAnimateCtrl class) is available only to programs running under Windows 95 and Windows NT version 3.51 and later.

An animation control is a rectangular window that displays a clip in AVI (Audio Video Interleaved) format— the standard Windows video/audio format. An AVI clip is a series of bitmap frames, like a movie.

Animation controls can play only simple AVI clips. Specifically, the clips to be played by an animation control must meet the following requirements:

You can add the AVI clip to your application as an AVI resource, or it can accompany your application as a separate AVI file.

Since your thread continues executing while the AVI clip is displayed, one common use for an animation control is to indicate system activity during a lengthy operation. For example, the Find dialog box of the Windows 95 Explorer displays a moving magnifying glass as the system searches for a file.

If you create a CAnimateCtrl object within a dialog box or from a dialog resource using the dialog editor, it will be automatically destroyed when the user closes the dialog box.

If you create a CAnimateCtrl object within a window, you may need to destroy it. If you create the CAnimateCtrl object on the stack, it is destroyed automatically. If you create the CAnimateCtrl object on the heap by using the new function, you must call delete on the object to destroy it. If you derive a new class from CAnimateCtrl and allocate any memory in that class, override the CAnimateCtrl destructor to dispose of the allocations.

For more information on using CAnimateCtrl, see Control Topics and Using CAnimateCtrl in the Visual C++ Programmer's Guide.

#include <afxcmn.h>

Class MembersBase ClassHierarchy Chart

Samples   MFC Sample CMNCTRL1MFC Sample MFCIE

See Also   Animation Control Styles in CAnimateCtrl::Create, ON_CONTROL