哎,关于MCI的问题
void CTestPayerDlg::OnPlayerstart() {
// TODO: Add your control notification handler code here
MessageBox("您现在点击的是播放!");
UINT wDeviceID;
DWORD dwReturn;
MCI_OPEN_PARMS mciOpenParms;
mciOpenParms.wDeviceID =0;
mciOpenParms.lpstrDeviceType=(LPCSTR) MCI_DEVTYPE_WAVEFORM_AUDIO;
mciOpenParms.lpstrElementName= (LPCSTR) "C:\Documents and Settings\GWOLF18\桌面\垃圾\TestPayer\2.wav";
if(dwReturn=(mciSendCommand(NULL,MCI_OPEN,MCI_WAIT | MCI_OPEN_TYPE |
MCI_OPEN_TYPE_ID | MCI_OPEN_ELEMENT,(DWORD)(LPVOID) &mciOpenParms)))
{
MessageBox("打开失败!");
}
MCI_PLAY_PARMS PlayParms;
PlayParms.dwFrom=0;
mciSendCommand (wDeviceID, MCI_PLAY,
MCI_FROM, (DWORD)(LPVOID)
&PlayParms);
/*wDeviceID=mciOpenParms.wDeviceID;
mciSendCommand(wDeviceID,MCI_PLAY,MCI_OPEN_TYPE,(DWORD)(LPVOID) &mciOpenParms);*/
}
做了一个映射,怎么改都打不开音乐文件,就是点一个播发按钮就会播放音乐,可我不过怎么改这段代码都不行,其他代码都是MFC的一个对话框的代码,就不传了。希望有人帮我改改啊