Uso del flag di MCI_NOTIFY
Nell'esempio seguente viene illustrato come viene usato il flag MCI_NOTIFY con il comando MCI_PLAY . L'handle alla routine della finestra che elabora il messaggio di MM_MCINOTIFY viene specificato in hwnd.
MCI_DGV_PLAY_PARMS mciPlay;
DWORD dwFlags;
mciPlay.dwCallback = MAKELONG(hwnd, 0);
dwFlags = MCI_NOTIFY;
mciSendCommand(wMCIDeviceID, MCI_PLAY, dwFlags, (DWORD)(LPSTR)&mciPlay);