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?
 
chensuConnect With a Mentor Commented:
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
 
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
All Courses

From novice to tech pro — start learning today.