Solved

CAnimateCtrl can't play AVI file properly

Posted on 2002-06-23
10
751 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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

615 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