CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: CAnimateCtrl

  1. #1
    Join Date
    Jul 2006
    Posts
    3

    Question CAnimateCtrl

    Hello every one;
    please can anyone tell me how i use CAnimateCtrl to play video in my program with explain?

  2. #2
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: CAnimateCtrl

    is there any need of This Control to Play Video. have a Look for MCIWndPlay() in MSDN and just open your header file <vfw.h> everything is there what else you want. So Simply use Window provided MCI classes this will help you.

    Thanx

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: CAnimateCtrl

    CAnimateCtrl displays a clip only in Audio Video Interleaved (AVI) format.
    See Using CAnimateCtrl.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  4. #4
    Join Date
    Jul 2006
    Posts
    3

    Re: CAnimateCtrl

    thank you very much humptydumpty i value your information but if u have any any information about CAnimate please tell me!

  5. #5
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: CAnimateCtrl

    Quote Originally Posted by numnum
    thank you very much humptydumpty i value your information but if u have any any information about CAnimate please tell me!
    Did u checked the Link Provide by Ovidiucucu .

    Thanx

  6. #6
    Join Date
    Jul 2006
    Posts
    3

    Re: CAnimateCtrl

    yes i checked but when i execute the program assertion dialogebox appear ,i think that the problem in parameter of CWND please can u help me

    thanks

  7. #7
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: CAnimateCtrl

    Then Show your Code. Then Only Some one Can help you.
    Thanx

  8. #8
    Join Date
    Oct 2000
    Location
    India
    Posts
    4,620

    Thumbs up Re: CAnimateCtrl

    Hi,

    If your aim is to play an .AVI file, there are 3 ways of doing it.

    1) Use CAnimateCtrl :-
    NOTE:- Can play ONLY uncompressed .avi files.For Example,it will not work with
    Globe.avi.

    2) Use mciSendString

    3) Use Video For Windows (VFW)

    Take a look at http://www.geocities.com/contactgiri...llaneous1.html
    to see how they can be used in your application.
    All luck and have a great day.

    Regards,
    V.Girish

    Visit www.geocities.com/contactgirish for Source code, Tutorials, FAQs and Downloads.

  9. #9
    Join Date
    Feb 2006
    Location
    Singapore
    Posts
    25

    Talking Re: CAnimateCtrl

    Hi Girish

    I read your suggest and decided to use the vfw approach, but I encounter the following link error , plse see the attached jpg file.

    my code is
    Code:
    void CvcvideoDlg::OnBnClickedVfw()
    {
    	// TODO: Add your control notification handler code here
    
    HWND hMCI;
    		TCHAR szFile[] = "day1_1.avi";
    
    		hMCI = MCIWndCreate(m_hWnd,AfxGetApp()->m_hInstance, 
    				    MCIWNDF_SHOWNAME|MCIWNDF_NOMENU, NULL);
    
    		if (MCIWndOpen(hMCI,szFile, 0) != 0)
    		{
    		  MessageBox("Unable to play AVI!","Error!"); 
    		  MCIWndDestroy(hMCI);
    		}
    
    }
    Attached Images Attached Images

  10. #10
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: CAnimateCtrl

    You are running around tail since about one month, instead of using CAnimateCtrl which is very, very simple.

    Anytime you get an assertion, see first what's the cause (eventually sare it with us), and only after that, shoot in the dark.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  11. #11
    Join Date
    Feb 2006
    Location
    Singapore
    Posts
    25

    Talking Re: CAnimateCtrl

    Hi ovidiucucu

    May I ******** some points

    1) I am kenobe not numnum

    2) I just join this thread 2 days ago.

    3) I prefer vfw but not CAnimateCtrl because CAnimateCtrl can not play non-compressed avi files.

    4) I would like to playback other vido format such as .mpg and others,
    Couild you please throw some lights?
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured