void CTestDlg::OnOK()
{
// TODO: Add extra validation here
CString s;
CFile file;
file.Open("D:\\music\\经典老歌精选\\bglist.js",CFile::modeCreate|CFile::modeWrite);
file.SeekToBegin();
CString strFileTitle;
CFileFind finder;
BOOL bWorking = finder.FindFile("D:\\music\\经典老歌精选\\*.mp3");
while(bWorking)
{
bWorking=finder.FindNextFile();
strFileTitle=finder.GetFileTitle();
s.Format("mkList(\"http://linux.ustc.edu.cn/~xyu/songs/foreign/"+strFileTitle+".mp3\",\""+strFileTitle+"\")\n");
file.Write(s,s.GetLength());
}
file.Flush();
file.Close();
CDialog::OnOK();
}