Guides & Tutorials (beta)

Using the MFC class CAnimateCtrl

by Kirk Stowell Visual C++ Created on 11/16/2007  |  Updated on 07/31/2024 0/5 ( 0 votes )

Its pretty easy to implement an avi control. Follow these steps to add an avi animation control (CAnimateCtrl) to your dialog resource. Here is a quick tip for doing just that.

Copy Files Animation

In the resource editor, click on the animate control icon, and place one on your dialog. Next go into 'Class Wizard' and add a control name to your newly inserted component. Example: CAnimateCtrl m_avi. This is placed in your .h file. Next, import the .avi file into your project. To do this, highlight your resource project name, and right click in the resource view window. Select import. Set the filter to *.avi, and select the avi file you want to import. Enter "AVI" for resource type in the custom resource type dialog box.

Add the following code to your project:

BOOL CAvidemoDlg::OnInitDialog()
{
    CDialog::OnInitDialog();
    ...
    ...

    // TODO: Add extra initialization here
    m_avi.Open( IDR_AVI ); // open the avi resource.
    m_avi.Play( 0, -1,-1 );play avi resource.

    // return TRUE unless you set the focus to a control
    return TRUE;
}

User Comments

No comments yet, sign in to comment.

Secure Transactions

Online transactions are secure and protected.


Ssl seal 1
This site is protected by Trustwave's Trusted Commerce program
CompliAssure Secured

Money Back Guarantee

If you are not 100% happy with your purchase within 30 days, you can return it for any reason. Your satisfaction is our priority!


Satisfication Guarantee

Contact sales@codejock.com for more details.