Solved

CAnimateCtrl can't play AVI file properly

Posted on 2002-06-23
10
712 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Looking for a specific application/software 2 110
windows 10 how make picture as desktop background 2 62
has22 challenge 11 94
firstChar challenge 13 115
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 …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 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