16 static const tchar winmmStr[] =
_T(
"WINMM.DLL");
18 static const char mciSendCommandStr[] =
"mciSendCommandW";
20 static const char mciSendCommandStr[] =
"mciSendCommandA";
57 TWindow(
nullptr,
nullptr, module),
80 WaitingForNotification(
false)
131 DeviceId =
parms.wDeviceID;
160 SetBusyIfNeeded(flags);
177 SetBusyIfNeeded(flags);
194 SetBusyIfNeeded(flags);
215 SetBusyIfNeeded(flags);
227 SetBusyIfNeeded(flags);
A private TWindow derivative used by TMci to capture events.
TResult EvMciNotify(TParam1, TParam2)
Notifies the MCI class that the MCI event has finished.
TMci is a Windows MCI (Media Control Interface) encapsulation class.
MCIERROR Play(const MCI_PLAY_PARMS &, DWORD_PTR flags=0)
Plays the MCI device.
MCIDEVICEID GetDeviceId() const
Returns the ID of the open MCI device.
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 Close()
Stops the MCI device and closes it.
void SetBusy(bool)
Sets the busy flag for the MCI device.
HWND GetCallbackWindow() const
Returns the callback. If the window exists, the handle of the window is returned.
MCIERROR Open(const MCI_OPEN_PARMS &, DWORD_PTR flags=0)
Opens the MCI device.
MCIERROR Load(const tstring &fileName, DWORD_PTR flags=0)
Loads the file into the MCI device.
MCIERROR SendCommand(UINT msg, DWORD_PTR flags, DWORD_PTR param)
Sends the MCI command message to the device if it's not busy.
bool IsBusy() const
Returns true if the MCI is currently busy doing something.
MCIERROR Resume(DWORD_PTR flags=0)
Resumes playing of the MCI device.
MCIERROR Pause(DWORD_PTR flags=0)
Pauses the MCI device.
MCIERROR Seek(const MCI_SEEK_PARMS &, DWORD_PTR flags=0)
Seeks a particular position on the MCI device.
virtual TResult MciNotify(TParam1, TParam2)
The default MciNotify is to return 0.
MCIERROR Stop(DWORD_PTR flags=0)
Stops the MCI device.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
static TModule & GetModule()
static MCIERROR mciSendCommand(MCIDEVICEID, UINT msg, DWORD_PTR flags, DWORD_PTR param)
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
HWND GetHandle() const
Returns the handle of the window.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Windows MCI (Media Control Interface) encapsulation classes.
Object Windows Library (OWLNext Core)
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
#define EV_MESSAGE(message, method)
Response table entry for raw message handling Uses a dispatcher that just forwards WPARAM and LPARAM.