1.1要用api,mci指令PlaySoundPlaySound The PlaySound function plays a sound specified by the specified file name, resource, or system event.BOOL WINAPI PlaySound( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound ); 但如果你要播放的文件在资源里,那就要先拷贝到硬盘,再播放了。2.0可以直接播放资源中的wav文件。
拖一个madie player控件进去 隐藏
为什么不用2.0呢? 很方便的
The PlaySound function plays a sound specified by the specified file name, resource, or system event.BOOL WINAPI PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound );
但如果你要播放的文件在资源里,那就要先拷贝到硬盘,再播放了。2.0可以直接播放资源中的wav文件。
1.1还可以用API