Solved

CAnimateCtrl can't play AVI file properly

Posted on 2002-06-23
10
697 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
  • 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
 

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 66
ORA-01403: no data found 43 83
pre4 challenge 19 88
wordappend challenge 8 85
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now