[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1019
  • Last Modified:

Bringing up .avi viewer from MFC program

I am using MFC 5.0.  From within my program I would
like to play an .avi file.  Is there a way to fire up
an .avi player and have it play a particular file from
within an MFC program?
0
titchener
Asked:
titchener
1 Solution
 
galkinCommented:
If your .avi file has RLE copression you can use windows animate common controls and its MFC wrapper CAnimateCtrl. Palette must not change from frame to frame in this case. If your .avi file is more complicated you can use Microsoft Active Movie control which is free redistributable. You must enable ActiveX controls support for your project and insert this control using component gallery. ClassWizard will create class wrapper for this controls and oyur can either place control in your dialog resource or create it dinamically. Then use Active Movie methods to load and play .avi files. The third way is to use multimedia API functions and MCI for playing .avi files. See MFC samples AVIEDIT and AVIVIEW for more details.
If you want to play your .avi file in separate process and separate window use FindExecutable API function to find executable associated with .avi files and ShellExecute API function to launch it passing file to play as command line.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now