这次我们来编写一个简易的声音播放程序,首先来看一个例子:
#include<Windows.h>
#pragma comment(lib, "winmm.lib")
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd)
{
PlaySound(L"Deep Coral Caves J.wav", NULL, SND_FILENAME | SND_ASYNC);
MessageBox(NULL, L"Deep Coral Caves J 游戏声音世界", L" 消息窗口", 0);
return 0<