# include
# include
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpszCmdLine,int nCmdShow)
{
PlaySound("文件名",NULL,SND_FILENAME|SND_ASYNC|SND_LOOP);
MessageBox(NULL,"结束播放?","询问",MB_OK|MB_ICONQUESTION);
return 0;
}
可以只用一个playsound函数,需要简历win32工程,playsound函数只能播放wav格式的文件。