|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
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, Windows 98, 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:
There must be exactly one video stream and it must have at least one frame.
There can be at most two streams in the file (typically the other stream, if present, is an audio stream, although the animation control ignores audio information).
The clip must either be uncompressed or compressed with RLE8 compression.
No palette changes are allowed in the video stream.
You can add the AVI clip to your application as an AVI resource, or it can accompany your application as a separate AVI file.
Because 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 Windows 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.