BOOL PlaySound(
LPCTSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
首先,声音资源的类型必须为SOUND。比如,下面是一个rc资源文件的例子:
TEST_SOUND SOUND "Test.wav"
在程序里,代码这样写:
PlaySound(MAKEINTRESOURCE(TEST_SOUND), hInstance, SND_RESOURCE);
BOOL PlaySound(
LPCTSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
首先,声音资源的类型必须为SOUND。比如,下面是一个rc资源文件的例子:
TEST_SOUND SOUND "Test.wav"
在程序里,代码这样写:
PlaySound(MAKEINTRESOURCE(TEST_SOUND), hInstance, SND_RESOURCE);