evc4.0下playsound的问题
DDUP 2011-11-29 10:56:46 我在evc中用playsound播放wav声音,用文件名的方式:PlaySound(_T("11.wav"),NULL,SND_FILENAME);能播放声音。
但是将wav文件作为资源添加到工程中,用PlaySound(MAKEINTRESOURCE(IDR_TIP_THR),NULL,SND_RESOURCE);则播放不了声音,编译时能正常编译的。
evc的帮助文件中说:
Add the following entry to the resource script (.rc) file of the application.
soundName WAVE \sounds\bells.wav
The soundName parameter is a placeholder for a name that you supply to refer to the wave resource sound. Wave resources are loaded and accessed like other application-defined Windows resources.
The following code example shows how to use the PlaySound function to play a wave resource sound.
PlaySound (TEXT("soundName"), hInst, SND_RESOURCE | SND_ASYNC);
那个.rc文件根本不能以文本的方式打开啊,怎么添加语句呢?为什么用资源ID的方法不能播放呢?