OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TMci is a Windows MCI (Media Control Interface) encapsulation class. More...
#include <owl/mci.h>
Public Member Functions | |
TMci () | |
Creates a hidden window for catching messages. | |
virtual | ~TMci () |
If the MCI device is still open, this closes it now. Deletes the hidden window. | |
MCIERROR | Open (const MCI_OPEN_PARMS &, DWORD_PTR flags=0) |
Opens the MCI device. | |
MCIERROR | Close () |
Stops the MCI device and closes it. | |
MCIERROR | Play (const MCI_PLAY_PARMS &, DWORD_PTR flags=0) |
Plays the MCI device. | |
MCIERROR | Stop (DWORD_PTR flags=0) |
Stops the MCI device. | |
MCIERROR | Pause (DWORD_PTR flags=0) |
Pauses the MCI device. | |
MCIERROR | Resume (DWORD_PTR flags=0) |
Resumes playing of the MCI device. | |
MCIERROR | Seek (const MCI_SEEK_PARMS &, DWORD_PTR flags=0) |
Seeks a particular position on the MCI device. | |
MCIERROR | Seek (DWORD to, DWORD_PTR flags=0) |
Seeks a particular position on the MCI device. | |
MCIERROR | Load (const tstring &fileName, DWORD_PTR flags=0) |
Loads the file into the MCI device. | |
virtual TResult | MciNotify (TParam1, TParam2) |
The default MciNotify is to return 0. | |
bool | IsBusy () const |
Returns true if the MCI is currently busy doing something. | |
void | SetBusy (bool) |
Sets the busy flag for the MCI device. | |
MCIDEVICEID | GetDeviceId () const |
Returns the ID of the open MCI device. | |
HWND | GetCallbackWindow () const |
Returns the callback. If the window exists, the handle of the window is returned. | |
MCIERROR | SendCommand (UINT msg, DWORD_PTR flags, DWORD_PTR param) |
Sends the MCI command message to the device if it's not busy. | |
Static Public Member Functions | |
static MCIERROR | SendCommand (MCIDEVICEID deviceId, UINT msg, DWORD_PTR flags, DWORD_PTR param) |
Sends the MCI command message to the opened device. | |
TMci is a Windows MCI (Media Control Interface) encapsulation class.
owl::TMci::TMci | ( | ) |
Creates a hidden window for catching messages.
Definition at line 77 of file mci.cpp.
References owl::TWindow::Create().
|
virtual |
MCIERROR owl::TMci::Close | ( | ) |
Stops the MCI device and closes it.
Definition at line 140 of file mci.cpp.
References SendCommand(), SetBusy(), and Stop().
HWND owl::TMci::GetCallbackWindow | ( | ) | const |
Returns the callback. If the window exists, the handle of the window is returned.
Definition at line 102 of file mci.cpp.
References owl::TWindow::GetHandle().
|
inline |
|
inline |
Loads the file into the MCI device.
Definition at line 252 of file mci.cpp.
References GetCallbackWindow(), and SendCommand().
MCIERROR owl::TMci::Open | ( | const MCI_OPEN_PARMS & | parms, |
DWORD_PTR | flags = 0 ) |
Pauses the MCI device.
Definition at line 168 of file mci.cpp.
References GetCallbackWindow(), SendCommand(), and SetBusy().
MCIERROR owl::TMci::Play | ( | const MCI_PLAY_PARMS & | parms, |
DWORD_PTR | flags = 0 ) |
Resumes playing of the MCI device.
Definition at line 185 of file mci.cpp.
References GetCallbackWindow(), SendCommand(), and SetBusy().
MCIERROR owl::TMci::Seek | ( | const MCI_SEEK_PARMS & | parms, |
DWORD_PTR | flags = 0 ) |
Seeks a particular position on the MCI device.
This function requires the parameters to be specified in a structure.
Definition at line 224 of file mci.cpp.
References SendCommand().
Seeks a particular position on the MCI device.
This function is provided for convenience.
Definition at line 236 of file mci.cpp.
References GetCallbackWindow(), and Seek().
|
static |
Sends the MCI command message to the opened device.
Definition at line 277 of file mci.cpp.
References owl::TWinMM::mciSendCommand().
Sends the MCI command message to the device if it's not busy.
Definition at line 113 of file mci.cpp.
References GetDeviceId(), IsBusy(), and SendCommand().
Stops the MCI device.
Definition at line 151 of file mci.cpp.
References GetCallbackWindow(), SendCommand(), and SetBusy().