//Get a listing of dac files from the selected directory. //Not used at the moment but may do later. int CDataPage::GetDatasetList() { char tempDir[2048] = {'\0'}; //Save the current Directory. ::GetCurrentDirectory((DWORD)sizeof(tempDir),tempDir); //Set the current directory to the one with the data source. ::SetCurrentDirectory(m_cDataPath); m_cFileList.RemoveAll(); WIN32_FIND_DATA fd; HANDLE hFind = ::FindFirstFile (_T (m_cFileExtension), &fd); if (hFind != INVALID_HANDLE_VALUE) { do { if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { TRACE (_T ("%s\n"), fd.cFileName); CString s(fd.cFileName); m_cFileList.Add(fd.cFileName); } } while (::FindNextFile (hFind, &fd)); ::FindClose (hFind); } //Restore original current directory. ::SetCurrentDirectory(tempDir); return m_cFileList.GetSize(); }