play a .mov from my application

does it exits un API which can play a
a file of type movie from a application
in C++
nadiamehrezAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chensuCommented:
Assume you are using Win32 platform.

There are several ways.

1. ::ShellExecute(hWnd, NULL, _T("file.mov"), NULL, NULL, SW_SHOWNORMAL);

This will launch the application associated with .mov.

2. Use MCI.

MCI
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/multimed/mci_7vvt.htm

MovPlay: Playing Movies Using MCI
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vcsample/vcsmpmovplay.htm

3. Use MCIWnd Window Class, which simplifies MCI.

Mplay: Simple AVI Playback Application
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vcsample/vcsmpmplay.htm

MCIplay: Simple Video Player
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vcsample/vcsmpmciplay.htm

4. Use Windows Media Player ActiveX Control.

Microsoft DirectShow
http://www.microsoft.com/directx/dxm/help/ds/c-frame.htm#default.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nadiamehrezAuthor Commented:
::ShellExecute(hWnd, NULL, _T("file.mov"), NULL, NULL, SW_SHOWNORMAL);

I want more precision please about the first proposition, Does the third parameter take the name of application
which must be launch or only the name of
the file, for example in my case, can I
launch internet explorer if i want to open an URL site from my application.
is it corect or not this instruction??
ShellExecute(hwnd, NULL, "c:\\ProgramFiles\\iexplore http:\\microsoft.com\", NULL, NULL, SW_SHOWNORMAL)
 
0
chensuCommented:
If IE is the default Web browser, you can simply use

ShellExecute(hwnd, NULL, "http:\\microsoft.com", NULL, NULL, SW_SHOWNORMAL);

If not,

ShellExecute(hwnd, NULL, ""c:\\ProgramFiles\\iexplore", "http:\\microsoft.com", NULL, SW_SHOWNORMAL);

Check out the documentation.
0
chensuCommented:
Ignore my previous comment. It should be


If IE is the default Web browser, you can simply use

ShellExecute(hwnd, NULL, "http://microsoft.com", NULL, NULL, SW_SHOWNORMAL);

If not,

ShellExecute(hwnd, NULL, "c:\\ProgramFiles\\iexplore", "http://microsoft.com", NULL, SW_SHOWNORMAL);

Check out the documentation.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.