#include "stdafx.h"
#include <graphics.h>
#include <conio.h>
#include <windows.h>
#pragma comment(lib,"Winmm.lib")
void main()
{
initgraph(640, 480);
mciSendString("open 1.mp3 alias mymusic", NULL, 0, NULL);
outtextxy(0, 0, "按任意鍵開始播放");
getch();
mciSendString("play mymusic", NULL, 0, NULL);
outtextxy(0, 0, "按任意鍵停止播放");
getch();
mciSendString("stop mymusic", NULL, 0, NULL);
mciSendString("close mymusic", NULL, 0, NULL);
outtextxy(0, 0, "按任意鍵退出程序");
getch();
closegraph();
}