|
Retrieving Information About a Movie
The following example sets the time format to frames and obtains the current
position if the device is playing.
MCI_DGV_SET_PARMS mciSet;
MCI_DGV_STATUS_PARMS mciStatus;
// Put in frame mode.
mciSet.dwTimeFormat = MCI_FORMAT_FRAMES;
mciSendCommand(wDeviceID, MCI_SET,
MCI_SET_TIME_FORMAT,
(DWORD)(LPSTR)&mciSet);
mciStatus.dwItem = MCI_STATUS_MODE;
mciSendCommand(wDeviceID, MCI_STATUS,
MCI_STATUS_ITEM,
(DWORD)(LPSTR)&mciStatus);
// If device is playing, get the position.
if (mciStatus.dwReturn == MCI_MODE_PLAY){
mciStatus.dwItem = MCI_STATUS_POSITION;
mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM,
(DWORD)(LPSTR)&mciStatus);
// Update the position from mciStatus.dwReturn.
}
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|