EasyX中使用背景音乐

#include 
#include 
#include 

#pragma comment(lib,"winmm.lib")

int main()
{
	initgraph(600, 600);
	IMAGE bk;
	loadimage(&bk, L"./res/美国情报机构.jpg", 600, 600);
	putimage(0, 0, &bk);

	mciSendString(L"open res/Waning_Moments.mp3 alias bk", NULL, 0, NULL);
	mciSendString(L"play bk repeat", NULL, 0, NULL);



	_getch();
	mciSendString(L"puase bk", NULL, 0, NULL);
	mciSendString(L"stop bk", NULL, 0, NULL);
	mciSendString(L"close bk", NULL, 0, NULL);
	closegraph();
	return 0;
}





 

你可能感兴趣的:(C/C++,EasyX)