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

CAnimateCtrl Example

By Kirk Stowell | 15 Dec 1999
Demonstrates the use of the windows animation control
2 votes, 33.3%
1

2

3
1 vote, 16.7%
4
3 votes, 50.0%
5
3.84/5 - 11 votes
μ 3.84, σa 3.46 [?]
  • 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#??? Pinmemberjabulino1:23 9 Jan '06  
    GeneralResum avi Pinmembermcnam19:01 15 Dec '05  
    GeneralOne 1 MB Avi file doesn't shows Pinmemberd00_ape11:21 26 Sep '05  
    Questionhow to create an appropriate AVI Pinmembermohsen nourian21:44 2 Jul '05  
    AnswerRe: how to create an appropriate AVI Pinmember.dan.g.22:20 2 Jul '05  
    GeneralRe: how to create an appropriate AVI Pinmembermeistertausend2:55 2 Nov '05  
    QuestionHow to access pixel values in an avi stream? PinmemberJDeimos2:22 25 Jan '05  
    GeneralWhere to find AVI-Files PinsussAnonymous2:48 9 Aug '04  
    GeneralCAnimateCtrl upgradation PinsussDebasish Bose22:25 19 Jun '04  
    GeneralResource type must be called "AVI" or it will not work PinmemberJ Cardinal13:17 13 Dec '02  
    GeneralStretch Avi Pinmemberoff5:40 10 May '02  
    GeneralLoad avi from lets say C:\test.avi PinmemberKeybee3:36 3 Feb '02  
    GeneralRe: Load avi from lets say C:\test.avi PinmemberSynetech9:43 18 Feb '03  
    Generalgetting rid of avi PinmemberAnonymous13:18 15 Oct '01  
    GeneralRe: getting rid of avi PinmemberHiten Parmar9:54 3 Apr '02  
    GeneralNEED HELPON AVI!!! PinmemberRENEE15:30 24 May '01  
    GeneralRe: NEED HELPON AVI!!! PinmemberEarl Rex Arao-arao21:41 30 May '01  
    GeneralNEED HELPON AVI!!! PinmemberRENEE15:30 24 May '01  
    GeneralTransparent PinmemberAnonymous11:22 11 May '01  
    GeneralCompressed AVI PinsussMeraviglia, Dario22:37 13 Jul '00  
    GeneralRe: Compressed AVI PinmemberChristian Sonntag8:41 22 Jul '01  
    GeneralRe: Compressed AVI PinmemberChristian Sonntag8:43 22 Jul '01  
    GeneralAVI file PinsussTao Li12:27 17 Mar '00  
    GeneralAVI file PinsussTao Li12:27 17 Mar '00  
    GeneralRe: AVI file PinmemberAnonymous18: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
    Web04 | 2.5.120210.1 | Last Updated 16 Dec 1999
    Article Copyright 1999 by Kirk Stowell
    Everything else Copyright © CodeProject, 1999-2012
    Terms of Use
    Layout: fixed | fluid