Click here to Skip to main content
Licence 
First Posted 15 Dec 1999
Views 114,475
Bookmarked 22 times

CAnimateCtrl Example

By | 15 Dec 1999 | Article
Demonstrates the use of the windows animation control
  • Download demo project - 144 Kb
  • Sample Image - controls_avi.gif

    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

    About the Author

    Kirk Stowell

    CEO
    Codejock Software
    United States United States

    Member



    Sign Up to vote   Poor Excellent
    Add a reason or comment to your vote: x
    Votes of 3 or less require a comment

    Comments and Discussions

     
    You must Sign In to use this message board. (secure sign-in)
     
    Search this forum  
     FAQ
        Noise  Layout  Per page   
      Refresh
    Questionhow about it in c#??? Pinmemberjabulino0:23 9 Jan '06  
    GeneralResum avi Pinmembermcnam18:01 15 Dec '05  
    Hi
    -How to resum avi when you use Stop() function"the avi not on the end".Thank's
    GeneralOne 1 MB Avi file doesn't shows Pinmemberd00_ape10:21 26 Sep '05  
    Questionhow to create an appropriate AVI Pinmembermohsen nourian20:44 2 Jul '05  
    AnswerRe: how to create an appropriate AVI Pinmember.dan.g.21:20 2 Jul '05  
    GeneralRe: how to create an appropriate AVI Pinmembermeistertausend1:55 2 Nov '05  
    QuestionHow to access pixel values in an avi stream? PinmemberJDeimos1:22 25 Jan '05  
    GeneralWhere to find AVI-Files PinsussAnonymous1:48 9 Aug '04  
    GeneralCAnimateCtrl upgradation PinsussDebasish Bose21:25 19 Jun '04  
    GeneralResource type must be called "AVI" or it will not work PinmemberJ Cardinal12:17 13 Dec '02  
    GeneralStretch Avi Pinmemberoff4:40 10 May '02  
    GeneralLoad avi from lets say C:\test.avi PinmemberKeybee2:36 3 Feb '02  
    GeneralRe: Load avi from lets say C:\test.avi PinmemberSynetech8:43 18 Feb '03  
    Generalgetting rid of avi PinmemberAnonymous12:18 15 Oct '01  
    GeneralRe: getting rid of avi PinmemberHiten Parmar8:54 3 Apr '02  
    GeneralNEED HELPON AVI!!! PinmemberRENEE14:30 24 May '01  
    GeneralRe: NEED HELPON AVI!!! PinmemberEarl Rex Arao-arao20:41 30 May '01  
    GeneralNEED HELPON AVI!!! PinmemberRENEE14:30 24 May '01  
    GeneralTransparent PinmemberAnonymous10:22 11 May '01  
    GeneralCompressed AVI PinsussMeraviglia, Dario21:37 13 Jul '00  
    GeneralRe: Compressed AVI PinmemberChristian Sonntag7:41 22 Jul '01  
    GeneralRe: Compressed AVI PinmemberChristian Sonntag7:43 22 Jul '01  
    GeneralAVI file PinsussTao Li11:27 17 Mar '00  
    GeneralAVI file PinsussTao Li11:27 17 Mar '00  
    GeneralRe: AVI file PinmemberAnonymous17:45 4 Nov '00  

    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.

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