##
CStringList library; CFileFind file; bool result=file.FindFile("C:\\*.jpg"); while(result) { result= file.FindNextFile(); //library.AddTail(file.GetFilePath()); CString szfilename=file.GetFilePath(); //全路径 library.AddTail(szfilename); } CString name; POSITION rPos; rPos = library.GetHeadPosition(); while (rPos != NULL) { name = library.GetNext(rPos); MessageBox(name.GetBuffer(50)); }
时间: 2024-11-09 18:18:57