The Streaming Device Duet Sample (DUET1) uses mciPlayFile to play audio help. When the application receives an HM_INFORM message, mciPlayFile is issued as shown in the following code fragment.
case HM_INFORM:
/*
* The user has selected the "Play Audio Help" selection in the
* IPF help panel.
*
* To initiate the playing of audio help, we need to issue
* mciPlayFile.
*
* Note that we assume the HM_INFORM message came from the "Play
* Audio Help" selection since it is the only :link. with an inform
* reftype in the .ipf file. If there were more, we would have to
* check the resource identifier to determine for which selection
* this message was generated.
*/
/*
* Load the name of the audio help file from the resource.
*/
WinLoadString( hab,
(HMODULE) NULL,
IDS_HELP_WAVEFILE,
(SHORT) sizeof( achAudioHelpFile),
achAudioHelpFile);
ulError = mciPlayFile( (HWND)NULL, /* Ignore owner
window */
(PSZ)achAudioHelpFile, /* Audio file
to play */
MCI_ASYNC, /* Command processed
asynchronously */
(PSZ)NULL, /* Ignore title */
(HWND)NULL ); /* Ignore viewport
window */
if (ulError)
{
ShowMCIErrorMessage( ulError);
}
return( (MRESULT) 0);