?? musicplayer.cpp
字號:
/****************************************************
Author: S. Senthil kumar
File: MusicPlayer.cpp
Purpose: Implementation of Bg music
******************************************************/
#include "Global.h"
#include "MusicPlayer.h"
extern CString GetMusicDirectory();
extern int count;
extern char* filearray[50];
extern CStatusBarCtrl statusbar;
MusicPlayer::MusicPlayer()
{
dir=GetMusicDirectory();
//Get all files in dir.
CFileFind finder;
statusbar.SetText("Initializing",2,0);
BOOL stillremain=finder.FindFile(dir+"\\*.*");
count=0;
while (stillremain && count<50)
{
stillremain=finder.FindNextFile();
if (stillremain && !finder.IsDirectory())
{
//Load filenames into filearray.
filearray[count]=new char[finder.GetFileName().GetLength()];
strcpy(filearray[count],finder.GetFileName());
count++;
}
}
finder.Close();
//Begin random music play thread.
AfxBeginThread(RandomMusicPlay,this,THREAD_PRIORITY_LOWEST);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -