VC中播放声音文件时,出现了问题。救命呀!!!
lxwq 2004-08-20 10:48:00 我已经将要播放的.wav声音文件加载到资源里,并使用下面函数播放:
PlaySound(MAKEINTRESOURCE(IDR_WAVE1),AfxGetResourceHandle( ),SND_ASYNC|SND_RESOURCE|SND_NODEFAULT|SND_LOOP);
但是执行时出现5个错误:
--------------------Configuration: pctime - Win32 Debug--------------------
Compiling...
pctimeDlg.cpp
G:\项目\pctime测试开机时间\pctimeDlg.cpp(175) : error C2065: 'PlaySound' : undeclared identifier
G:\项目\pctime测试开机时间\pctimeDlg.cpp(175) : error C2065: 'SND_ASYNC' : undeclared identifier
G:\项目\pctime测试开机时间\pctimeDlg.cpp(175) : error C2065: 'SND_RESOURCE' : undeclared identifier
G:\项目\pctime测试开机时间\pctimeDlg.cpp(175) : error C2065: 'SND_NODEFAULT' : undeclared identifier
G:\项目\pctime测试开机时间\pctimeDlg.cpp(175) : error C2065: 'SND_LOOP' : undeclared identifier
Error executing cl.exe.
pctimeDlg.obj - 5 error(s), 0 warning(s)
我是在:http://dev.csdn.net/article/8/8040.shtm 看见的,我这里资料也很多,不需要资料了,请高手直接告诉我哪里错了好吗?我是按照网业上的函数,直接复制进去的,没想到通不过:(