Solved

CAnimateCtrl can't play AVI file properly

Posted on 2002-06-23
10
743 Views
Last Modified: 2013-11-20
Hi, i'm using the CAnimateCtrl to play a small AVI clip (no sound) in my Visual C++ software.. i have no problem with the few AVI clips i created earlier... but i just created another new AVI clips using ULead GIF animator but the software can't display/play it properly!
the video clip is distorted, blank or crash the system when it was played..
i've tried many of different settings when creating the avi file (256colour, 24 bit colour, different compression, different data type..
) but got no luck so far.. so can any tell me how to fix this problem??
or is there any other way i can play a short video clip easily in my VC++ software? (maybe mpeg, animated gif...etc?)
i need help urgently..thanks
0
Comment
Question by:rw8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 

Accepted Solution

by:
vpomona earned 100 total points
ID: 7104283
    /** Play an AVI **/
TCHAR szFile[] = "filename.avi";    
     HWND m_hMCI = MCIWndCreate(m_hWnd,AfxGetApp()->m_hInstance,WS_OVERLAPPED|MCIWNDF_NOPLAYBAR|MCIWNDF_NOMENU, NULL);

if (MCIWndOpen(m_hMCI,szFile, 0) != 0)
{
     MessageBox("Unable to play AVI!","Error!");
      MCIWndDestroy(m_hMCI);
}

     MCIWndPlay(m_hMCI);
0
 

Author Comment

by:rw8
ID: 7105945
Thanks it works great.. but can you tell me how to make it "auto repeat"??
i tried to use the "mciSendCommand" but couldn't figure out how to do that
0
 

Expert Comment

by:vpomona
ID: 7106392
MCIWndSetRepeat( m_hMCI,true);
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rw8
ID: 7106399
hm i'm afriad it doesn't work, according to MSDN it says:
The MCIWndSetRepeat macro only affects playback that the user initiates by hitting the play button on the toolbar. It will not affect playback started with the MCIWndPlay macro

so any other solution?
0
 

Expert Comment

by:vpomona
ID: 7108213
Here's a link to the site that helped me.  Hope it helps you too.
Good Luck!

http://www.geocities.com/contactgirish/Miscellaneous1.html
0
 

Author Comment

by:rw8
ID: 7109235
Sorry but i still can't figure out how to auto repeat the video clip.. anyone else can help??
0
 

Expert Comment

by:vpomona
ID: 7109303
So is this a new question?
0
 

Author Comment

by:rw8
ID: 7109315
No this is not.. cos when i was using CAnimateCtrl, i was using the "Auto Repeat" function and i was able to do that easily.. so if i have to use something other thatn CAnimateCtrl, i would need a way to do it as well or it will be no use for me.

cheers,
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question