The following code illustrates how to set run-time cue points for a media device.
/* Set a cue point 30 secs in the media */ USHORT usDeviceID; HWND hwndMyWindow; MCI_CUEPOINT_PARMS cuepointparms; /* Cue point parameter structure */ /* Assign hwndCallback the handle to the PM Window - this returns MM_MCICUEPOINT messages. */ cuepointparms.hwndCallback = hwndMyWindow; cuepointparms.ulCuepoint = (ULONG) 30000; /* Current time format format = MS */ mciSendCommand( usDeviceID, /* Device ID */ MCI_SET_CUEPOINT, /* MCI set cue point message */ MCI_SET_CUEPOINT_ON | MCI_WAIT, /* Flags for this message */ (ULONG) &cuepointparms, /* Data structure */ 0); /* No user parm */