AnimationEnable Example for C++ 4.0 and later

This example loads and plays an animated file. It assumes that the LEAD control has already been sized to the aspect ratio of the image.

// Load all pages of an AVI file.
m_Lead1.Load("c:\\windows\\system\\wndsurf1.avi", 0, 1, -1);

// Set properties for a scaled animation.
m_Lead1.SetAutoRepaint(TRUE);
m_Lead1.SetAutoSetRects(FALSE);

// Set the image display size to match the LEAD control.
m_Lead1.SetDstRect(0.0f, 0.0f, m_Lead1.GetScaleWidth(), m_Lead1.GetScaleHeight());
m_Lead1.SetDstClipRect(0.0f, 0.0f, m_Lead1.GetScaleWidth(), m_Lead1.GetScaleHeight());

// Allow a continuous loop.
m_Lead1.SetAnimationLoop(TRUE);

// Start the animation.
m_Lead1.SetAnimationEnable(TRUE);