Index   Commented   Search   About

Setting the Time Format

Use the MCI_SET command message along with the MCI_SET_PARMS structure to set the time format for an open device. Set the dwTimeFormat member to one of the following constants.

Constant
Time format
MCI_FORMAT_BYTES
Bytes (in pulse code modulated [PCM] format files)
MCI_FORMAT_MILLISECONDS
Milliseconds
MCI_FORMAT_MSF
Minute/second/frame
MCI_FORMAT_SAMPLES
Samples
MCI_FORMAT_SMPTE_24
SMPTE, 24 frame
MCI_FORMAT_SMPTE_25
SMPTE, 25 frame
MCI_FORMAT_SMPTE_30
SMPTE, 30 frame
MCI_FORMAT_SMPTE_30DROP
SMPTE, 30 frame drop
MCI_FORMAT_TMSF
Track/minute/second/frame
MCI_SEQ_FORMAT_SONGPTR
MIDI song pointer

The following example sets the time format to milliseconds on the device specified by the wDeviceID variable:

UINT wDeviceID;

MCI_SET_PARMS mciSetParms;

// Set time format to milliseconds.

mciSetParms.dwTimeFormat = MCI_FORMAT_MILLISECONDS;

if (mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT,

(DWORD) &mciSetParms))

// Error, unable to set time format.

return FALSE;

else

// Time format set successfully.

return TRUE;

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

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

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun