I need help using the macro MCI_TMSF_FRAME. I trying to write an application that will play CD's I would like to display the track of the CD playing using:
SetDlgItemText(hDlg,IDC_STATIC_TRACK, ?????argument 3))
MCI_TMSF_FRAME returns a BYTE : What does this mean and how do I use this macro with SetDlgItemText();
Platform SDK: Windows Multimedia
The MCI_TMSF_FRAME macro retrieves the frames component from a parameter containing packed tracks/minutes/seconds/frames (TMSF) information.
Time in TMSF format.
Returns the frames component of the specified TMSF information.
Time in TMSF format is expressed as a DWORD value with the least significant byte containing tracks, the next least significant byte containing minutes, the next least significant byte containing seconds, and the most significant byte containing frames.
The MCI_TMSF_FRAME macro is defined as follows:
#define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf) >> 24))
Looks like the macro you are looking at returns the last of the four components, FRAMES. I think in CD audio there are 75frames / sec.
Try MCI_TMSF_TRACK and get the return as a char. Use a funtion like sprintf() to get it into your string for SetDlgItemText()
You could also try type casting an int and using SetDlgItemInt()