Click here to Skip to main content
11,438,782 members (76,930 online)
Click here to Skip to main content

CAnimateCtrl Example

, 15 Dec 1999
Rate this:
Please Sign up or sign in to vote.
Demonstrates the use of the windows animation control
  • Download demo project - 144 Kb
  • Sample Image - controls_avi.gif

    <!-- Article Starts -->

    Its pretty easy to implement an avi control. Follow these steps to add an avi animation control (CAnimateCtrl) to your dialog resource:

    • In the resource editor, click on the animate control icon, and place one on your dialog.
    • 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, highlite 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:
      /////////////////////////////////////////////////////////////////////////////
      // CAvidemoDlg message handlers
      
      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;
      }
      

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    Share

    About the Author

    Kirk Stowell
    CEO Codejock Software
    United States United States
    No Biography provided

    Comments and Discussions

     
    Questionhow about it in c#??? Pin
    jabulino9-Jan-06 1:23
    memberjabulino9-Jan-06 1:23 
    GeneralResum avi Pin
    mcnam15-Dec-05 19:01
    membermcnam15-Dec-05 19:01 
    GeneralOne 1 MB Avi file doesn't shows Pin
    d00_ape26-Sep-05 11:21
    memberd00_ape26-Sep-05 11:21 
    Questionhow to create an appropriate AVI Pin
    mohsen nourian2-Jul-05 21:44
    membermohsen nourian2-Jul-05 21:44 
    AnswerRe: how to create an appropriate AVI Pin
    .dan.g.2-Jul-05 22:20
    member.dan.g.2-Jul-05 22:20 
    GeneralRe: how to create an appropriate AVI Pin
    meistertausend2-Nov-05 2:55
    membermeistertausend2-Nov-05 2:55 
    QuestionHow to access pixel values in an avi stream? Pin
    JDeimos25-Jan-05 2:22
    memberJDeimos25-Jan-05 2:22 
    GeneralWhere to find AVI-Files Pin
    Anonymous9-Aug-04 2:48
    sussAnonymous9-Aug-04 2:48 
    GeneralCAnimateCtrl upgradation Pin
    Debasish Bose19-Jun-04 22:25
    sussDebasish Bose19-Jun-04 22:25 
    GeneralResource type must be called "AVI" or it will not work Pin
    J Cardinal13-Dec-02 13:17
    memberJ Cardinal13-Dec-02 13:17 
    GeneralStretch Avi Pin
    off10-May-02 5:40
    memberoff10-May-02 5:40 
    GeneralLoad avi from lets say C:\test.avi Pin
    Keybee3-Feb-02 3:36
    memberKeybee3-Feb-02 3:36 
    GeneralRe: Load avi from lets say C:\test.avi Pin
    Synetech18-Feb-03 9:43
    memberSynetech18-Feb-03 9:43 
    Generalgetting rid of avi Pin
    Anonymous15-Oct-01 13:18
    memberAnonymous15-Oct-01 13:18 
    GeneralRe: getting rid of avi Pin
    Hiten Parmar3-Apr-02 9:54
    memberHiten Parmar3-Apr-02 9:54 
    GeneralNEED HELPON AVI!!! Pin
    RENEE24-May-01 15:30
    memberRENEE24-May-01 15:30 
    GeneralRe: NEED HELPON AVI!!! Pin
    Earl Rex Arao-arao30-May-01 21:41
    memberEarl Rex Arao-arao30-May-01 21:41 
    GeneralNEED HELPON AVI!!! Pin
    RENEE24-May-01 15:30
    memberRENEE24-May-01 15:30 
    my husband made a video with the webcam. and it saved as an AVI. he also wants me to put it on his webpage but i don't know the code to it can you help me please
    thank you
    PLEASE EMAIL MA ALIZE1973 @AOL.COMRose | [Rose]
    GeneralTransparent Pin
    Anonymous11-May-01 11:22
    memberAnonymous11-May-01 11:22 
    GeneralCompressed AVI Pin
    Meraviglia, Dario13-Jul-00 22:37
    sussMeraviglia, Dario13-Jul-00 22:37 
    GeneralRe: Compressed AVI Pin
    Christian Sonntag22-Jul-01 8:41
    memberChristian Sonntag22-Jul-01 8:41 
    GeneralRe: Compressed AVI Pin
    Christian Sonntag22-Jul-01 8:43
    memberChristian Sonntag22-Jul-01 8:43 
    GeneralAVI file Pin
    Tao Li17-Mar-00 12:27
    sussTao Li17-Mar-00 12:27 
    GeneralAVI file Pin
    Tao Li17-Mar-00 12:27
    sussTao Li17-Mar-00 12:27 
    GeneralRe: AVI file Pin
    Anonymous4-Nov-00 18:45
    memberAnonymous4-Nov-00 18:45 
    GeneralRe: AVI file Pin
    Michael Miller13-Mar-01 10:05
    memberMichael Miller13-Mar-01 10:05 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web01 | 2.8.150506.1 | Last Updated 16 Dec 1999
    Article Copyright 1999 by Kirk Stowell
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid