BOOL Open( LPCTSTR lpszFileName );
BOOL Open( UINT nID );
Return Value
Nonzero if successful; otherwise zero.
Parameters
lpszFileName
A CString object or a pointer to a null-terminated string that contains either the name of the AVI file or the name of an AVI resource. If this parameter is NULL, the system closes the AVI clip that was previously opened for the animation control, if any.
nID
The AVI resource identifier. If this parameter is NULL, the system closes the AVI clip that was previously opened for the animation control, if any.
Remarks
Call this function to open an AVI clip and display its first frame.
If the animation control has the ACS_AUTOPLAY style, the animation control will automatically start playing the clip immediately after it opens it. It will continue to play the clip in the background while your thread continues executing. When the clip is done playing, it will automatically be repeated.
If the animation control has the ACS_CENTER style, the AVI clip will be centered in the control and the size of the control will not change. If the animation control does not have the ACS_CENTER style, the control will be resized when the AVI clip is opened to the size of the images in the AVI clip. The position of the top left corner of the control will not change, only the size of the control.
If the animation control has the ACS_TRANSPARENT style, the first frame will be drawn using a transparent background rather than the background color specified in the animation clip.
Example
See the example for CAnimateCtrl::CAnimateCtrl.
CAnimateCtrl Overview | Class Members | Hierarchy Chart
See Also CAnimateCtrl::Close, CAnimateCtrl::Create