当前位置: 首页>>代码示例>>C++>>正文


C++ CFileFind::GetFileTitle方法代码示例

本文整理汇总了C++中CFileFind::GetFileTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileFind::GetFileTitle方法的具体用法?C++ CFileFind::GetFileTitle怎么用?C++ CFileFind::GetFileTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CFileFind的用法示例。


在下文中一共展示了CFileFind::GetFileTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: FindExtensions

void InformApp::FindExtensions(void)
{
  m_extensions.clear();
  for (int i = 0; i < 2; i++)
  {
    CString path;
    switch (i)
    {
    case 0:
      path.Format("%s\\Internal\\Extensions\\*.*",(LPCSTR)GetAppDir());
      break;
    case 1:
      path.Format("%s\\Inform\\Extensions\\*.*",(LPCSTR)GetHomeDir());
      break;
    default:
      ASSERT(FALSE);
      break;
    }

    CFileFind find;
    BOOL finding = find.FindFile(path);
    while (finding)
    {
      finding = find.FindNextFile();
      if (!find.IsDots() && find.IsDirectory())
      {
        CString author = find.GetFileName();
        if (author == "Reserved")
          continue;
        if ((author.GetLength() > 0) && (author.GetAt(0) == '.'))
          continue;

        path.Format("%s\\*.*",(LPCSTR)find.GetFilePath());
        CFileFind find;
        BOOL finding = find.FindFile(path);
        while (finding)
        {
          finding = find.FindNextFile();
          if (!find.IsDirectory())
          {
            CString ext = ::PathFindExtension(find.GetFilePath());
            if (ext.CompareNoCase(".i7x") == 0)
              m_extensions.push_back(ExtLocation(author,find.GetFileTitle(),(i == 0),find.GetFilePath()));
            else if (ext.IsEmpty() && (i == 1))
            {
              // Rename an old-style extension (with no file extension) to end with ".i7x"
              CString newPath = find.GetFilePath();
              newPath.Append(".i7x");
              if (::MoveFile(find.GetFilePath(),newPath))
                m_extensions.push_back(ExtLocation(author,find.GetFileTitle(),(i == 0),newPath));
            }
          }
        }
        find.Close();
      }
    }
    find.Close();
  }
  std::sort(m_extensions.begin(),m_extensions.end());
}
开发者ID:wyrover,项目名称:Windows-Inform7,代码行数:60,代码来源:Inform.cpp

示例2: FillLanguages

void COptionsGeneral::FillLanguages()
{
	CString csFile = CGetSetOptions::GetPath(PATH_LANGUAGE);
	csFile += "*.xml";

	CString csLanguage = CGetSetOptions::GetLanguageFile();

	CFileFind find;
	BOOL bCont = find.FindFile(csFile);
	int nEnglishIndex = NO_MATCH;

	while(bCont)
	{
		bCont = find.FindNextFile();
		int nIndex = m_cbLanguage.AddString(find.GetFileTitle());

		if(find.GetFileTitle() == csLanguage)
		{
			nEnglishIndex = -1;
			m_cbLanguage.SetCurSel(nIndex);
		}
		else if(find.GetFileTitle() == _T("English"))
		{
			if(nEnglishIndex == NO_MATCH)
				nEnglishIndex = nIndex;
		}
	}

	if(nEnglishIndex >= 0)
	{
		m_cbLanguage.SetCurSel(nEnglishIndex);
	}
}
开发者ID:svn2github,项目名称:ditto-cp,代码行数:33,代码来源:OptionsGeneral.cpp

示例3: GetFileNameArray

void CTaiKlineDlgHistorySelect::GetFileNameArray(CStringArray &sArry)
{
	CString sPath = "data\\historysh\\";
	CFileFind finder;
	int n = 0;
	BOOL bWorking = finder.FindFile(sPath+"*.hst");
	while(bWorking)
	{
	  bWorking = finder.FindNextFile();
	  CString filename = finder.GetFileTitle();
	  int nSize = sArry.GetSize ();
	  for(int j=0;j<nSize;j++)
	  {
		  if(filename <sArry[j])
		  {
			  sArry.InsertAt (j,filename);
			  break;
		  }
		  if(j==nSize-1)
			sArry.Add (filename);
	  }
	  if(nSize == 0)
			sArry.Add (filename);

	  n++;
	}
	sPath = "data\\historysz\\";
	n = 0;
	bWorking = finder.FindFile(sPath+"*.hst");
	while(bWorking)
	{
	  bWorking = finder.FindNextFile();
	  CString filename = finder.GetFileTitle();
	  int nSize = sArry.GetSize ();
	  BOOL bf;
	  bf=false;
	  for(int j=0;j<nSize;j++)
	  {
		  if(filename ==sArry[j])
		  {
			  bf=true;
			  
			  break;
			  
		  }
		  else
		  {
			  bf=false;
			  continue;
		  }
		  if(j==nSize-1)
			sArry.Add (filename);
	  }
	  if((nSize == 0)||(!bf))
			sArry.Add (filename);
	  n++;
	}
}
开发者ID:ifzz,项目名称:yinhustock,代码行数:58,代码来源:CTaiKlineDlgHistorySelect.cpp

示例4: ShowDB

void ShowDB()
{

	CFileFind finder;
	int iRowN = 0;
    int iNameLen = 0,iTemp = 0;
	std::cout<<"These are the databases !\n";
    int bWorking = finder.FindFile("..\\Data\\*.*");
	std::cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<'\n';//<---计32个字符
	std::cout<<"| Database                     |"<<'\n';
	std::cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<'\n';//<---计32个字符
	while(bWorking)
	{
		
      bWorking = finder.FindNextFile();
	  if (finder.IsDots())
         continue;
	  
      if (finder.IsDirectory())
      {
		 iRowN++;
         CString str = finder.GetFileTitle();
		 iNameLen = str.GetLength(); 
		 std::cout <<"| "<< (LPCTSTR) str;
		 for(iTemp = 29 - iNameLen;iTemp != 0;iTemp--)
			 std::cout<<' ';
		std::cout <<"|"<<'\n';
	  }   	  
	}
   	std::cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<'\n';//<---计32个字符
	std::cout<<"There are" <<iRowN<<" rows in the database!";
	finder.Close();
}
开发者ID:V756568,项目名称:MiniSQL,代码行数:33,代码来源:Display.cpp

示例5: GetDirectoryContain

void YpDirectory::GetDirectoryContain(vector<CString>& list)
{
	CFileFind ff;
	CString szDir = path;

	if(szDir.Right(1) != "\\")
	{
		szDir += "\\";
	}

	szDir += "*.*";

	BOOL res = ff.FindFile(szDir);
	const CString each = "{%s|%d|%s}";
	while(res)
	{
		res = ff.FindNextFile();
		CString temp;
		if (ff.IsDirectory() && !ff.IsDots())
		{
			temp.Format(each, ff.GetFileName(), 0, "Ŀ¼");
			list.push_back(temp);
		}
		else if(!ff.IsDirectory() && !ff.IsDots())
		{
			CFileStatus status;
			CString path = ff.GetFilePath();
			CFile::GetStatus(path, status);
			temp.Format(each, ff.GetFileName(), (UINT)(status.m_size / 1024.0), ff.GetFileTitle());
			list.push_back(temp);
		}
	}
	ff.Close();
}
开发者ID:ypcmos,项目名称:PhantomServer,代码行数:34,代码来源:FileSystem.cpp

示例6: UpdataFolderStatus

void CDlgArmLogICImage::UpdataFolderStatus()
{
	// Get the folder name
	m_Folder.RemoveAll();

	CString csFilePath = _T("");
	csFilePath = m.FilePath.ArmLogICImagePath;
	CFileFind finder;											//建立搜尋用的CFileFind物件
	BOOL bResult = finder.FindFile( csFilePath  + "*.*" );		//尋找第一個檔案
	while(bResult)
	{
		bResult = finder.FindNextFile();						//尋找下一個檔案
		if(!finder.IsDots() && finder.IsDirectory())
		{
			CString csFileDirectory = _T("");
			csFileDirectory.Format("%s", finder.GetFileTitle() );
			
			m_Folder.Add( csFileDirectory );
		}
	}
	
	m_listFolderStatus.ResetContent();
	int iSize = m_Folder.GetSize();
	for(int i=0;i<iSize;i++)
	{
		CString csFolderName = _T("");
		csFolderName = m_Folder.GetAt(i);
		m_listFolderStatus.AddString( csFolderName );
	}
	CString csFolderCounter = _T("");
	csFolderCounter.Format("Folder Counter: %d", iSize );
	m_wndlistFolderCounter.SetWindowText( csFolderCounter );
}
开发者ID:iqk168,项目名称:3111,代码行数:33,代码来源:DlgArmLogICImage.cpp

示例7: OnUpdate

//////////////////////////////////////////////////////////////
//功能:同步图库与显示内容
//////////////////////////////////////////////////////////////
void CModuleWnd::OnUpdate()
{
	GetListCtrl()->DeleteAllItems();
	CString strName;

	if (m_pCurrentDocument == NULL) //显示库目录
	{	
		strName = CModuleDoc::GetDefaultPath() + _T("\\*.");
		strName += CModuleDoc::m_szModuleLibFileExt;
		CFileFind finder;
		BOOL bOk = finder.FindFile(strName);

		while(bOk)
		{
			bOk = finder.FindNextFile();
			strName = finder.GetFileTitle();
			GetListCtrl()->InsertItem(1, strName, MLW_ICON_FOLDER);
		}
	}
	else //显示库内容
	{
		int nCount = m_pCurrentDocument->GetModuleCount();
		for (int i = 0; i < nCount; i++)
		{
			CModuleDoc::CModule* pModule = m_pCurrentDocument->GetModule(i);
			GetListCtrl()->InsertItem(i, pModule->m_strName, i);
		}
	}
}
开发者ID:JackWangCUMT,项目名称:SuperCxHMI,代码行数:32,代码来源:ModuleWnd.cpp

示例8: ScanLang

UINT CLang::ScanLang(CString dirPath)
{
	CString langName;
	CString fileName;
	BOOL bFound;
	UINT pos;
	CFileFind cFF;
	
	bFound = cFF.FindFile(dirPath+"\\*.txt");
	if(bFound)
	{
		do
		{
			bFound = cFF.FindNextFile();//查下一个
			
			fileName = cFF.GetFileTitle();//
			if(fileName != _T("中文") && fileName != _T("English"))//不等时
			{
				pos = fileName.Find('.');//
				langName = fileName.Left(pos);//
				m_langName[m_langCount] = fileName;//
				m_langCount++;
			}
			
		}
		while(bFound);//
	}
	else
	{
		return 0;
	}

	return m_langCount-2;//
}
开发者ID:Lamobo,项目名称:Lamobo-D1,代码行数:34,代码来源:Lang.cpp

示例9: Initialize

void SpellCheck::Initialize(void)
{
  if (spell != NULL)
    return;

  // Get long and short names for all possible dictionaries
  ::EnumSystemLocales(HandleLocale,LCID_SUPPORTED);

  // Set up the installed dictionaries
  CFileFind find;
  BOOL found = find.FindFile(theApp.GetAppDir()+"\\Dictionaries\\*.dic");
  while (found)
  {
    found = find.FindNextFile();
    std::map<std::string,std::string>::const_iterator it = allLanguages.find((LPCSTR)find.GetFileTitle());
    if (it != allLanguages.end())
      languages.insert(std::make_pair(it->second,it->first));
  }

  // Load registry settings
  char fileName[MAX_PATH] = "";
  CRegKey registryKey;
  if (registryKey.Open(HKEY_CURRENT_USER,"Software\\David Kinder\\Inform\\Spelling",KEY_READ) == ERROR_SUCCESS)
  {
    ULONG len = sizeof fileName;
    if (registryKey.QueryStringValue("Language",fileName,&len) != ERROR_SUCCESS)
      strcpy(fileName,"");
  }

  // As the default, use the UK English dictionary for UK English, otherwise US English
  if (fileName[0] == '\0')
  {
    switch (::GetUserDefaultLangID())
    {
    case MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_UK):
      strcpy(fileName,"en_GB");
      break;
    default:
      strcpy(fileName,"en_US");
      break;
    }
  }

  // Select an initial current language
  currentLanguage = languages.begin();
  for (StrPairSet::iterator it = languages.begin(); it != languages.end(); ++it)
  {
    if (it->second == fileName)
      currentLanguage = it;
  }
  InitSpellObject();
}
开发者ID:DavidKinder,项目名称:Windows-Inform7,代码行数:52,代码来源:SpellCheck.cpp

示例10: GetNameListOfDir

/**
desc:			获取某文件夹下的文件全路径名

strPath:		文件夹路径
strarrFileList: 保存文件列表的字符串数组

return:			返回 当前程序所在路径
*/
int CommonStrMethod::GetNameListOfDir(CString strPath, CStringArray& strarrFileList)
{
	CFileFind finder;
	BOOL bFound = finder.FindFile(strPath);
	int nCount = 0;
	for(; bFound; nCount++)
	{
		bFound = finder.FindNextFile();
		strarrFileList.Add(finder.GetFileTitle());
	}
	finder.Close();
	return nCount;
}
开发者ID:Forlearngit,项目名称:HallQueFront,代码行数:21,代码来源:CommonStrMethod.cpp

示例11: OnInitDialog

BOOL CMultiplay::OnInitDialog() 
{
		CDialog::OnInitDialog();

		if (!theApp.recording_ && theApp.mac_.size() > 0)
			name_ctrl_.AddString(DEFAULT_MACRO_NAME);

		// Find all .hem files in macro dir
		CFileFind ff;
		ASSERT(theApp.mac_dir_.Right(1) == "\\");
		BOOL bContinue = ff.FindFile(theApp.mac_dir_ + "*.hem");

		while (bContinue)
		{
			// At least one match - check them all
			bContinue = ff.FindNextFile();

			// Hide macro files beginning with underscore unless recording.
			// This is so that "sub-macros" are not normally seen but can be
			// selected when recording a macro that invokes them.
			if (theApp.recording_ || ff.GetFileTitle().Left(1) != "_")
				name_ctrl_.AddString(ff.GetFileTitle());
		}
		ASSERT(name_ctrl_.GetCount() > 0);
		name_ctrl_.SetCurSel(0);

		ASSERT(GetDlgItem(IDC_SPIN_PLAYS) != NULL);
		((CSpinButtonCtrl *)GetDlgItem(IDC_SPIN_PLAYS))->SetRange(1, UD_MAXVAL);

		ASSERT(GetDlgItem(IDC_PLAYS) != NULL);
		ASSERT(GetDlgItem(IDC_DESC_PLAYS) != NULL);
		ASSERT(GetDlgItem(IDC_SPIN_PLAYS) != NULL);
		GetDlgItem(IDC_PLAYS)->EnableWindow(!theApp.recording_);
		GetDlgItem(IDC_DESC_PLAYS)->EnableWindow(!theApp.recording_);
		GetDlgItem(IDC_SPIN_PLAYS)->EnableWindow(!theApp.recording_);
		FixControls();

		return TRUE;
}
开发者ID:KB3NZQ,项目名称:hexedit4,代码行数:39,代码来源:Dialog.cpp

示例12: GetFirstStrategyPosition

CString	CStkUIApp::GetNextNewStrategyTitle( CString & strExtBuffer, CString strPath )
{
	CString	string;
	VERIFY( string.LoadString( IDS_STRATEGY_NONAME ) );

	CString strExt	=	AfxGetStrategyFileExt( );
	if( !strExt.IsEmpty())
		strExtBuffer	=	strExt;

	CStringArray	astrExistTitle;
	POSITION pos = GetFirstStrategyPosition();
	while( NULL != pos )
	{
		CStrategy * pStrategy = GetNextStrategy( pos );
		astrExistTitle.Add( AfxGetFileTitleNoExt(pStrategy->GetPathName()) );
	}

	CFileFind finder;
	BOOL	bWorking	=	finder.FindFile( AfxGetFilePath( (LPCTSTR)strPath, LPCTSTR("*" + strExt) ) );
	while( bWorking )
	{
		bWorking	=	finder.FindNextFile();
		astrExistTitle.Add( finder.GetFileTitle( ) );
	}
	finder.Close();

	for( int i=1; ; i++ )
	{
		CString	strTemp;
		strTemp.Format( "%s(%d)", string, i );
		
		BOOL	bHas	=	FALSE;
		for( int k=0; k<astrExistTitle.GetSize(); k++ )
		{
			if( 0 == strTemp.CompareNoCase( astrExistTitle.ElementAt(k) ) )
			{
				bHas	=	TRUE;
				break;
			}
		}
		
		if( !bHas )
		{
			string	=	strTemp;
			break;
		}
	}
	return string;
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:49,代码来源:StkUI.cpp

示例13: FillBox

void CSelectVectorDlg::FillBox()
{
	 CFileFind  vectordir;
	 char chpath[MAX_PATH];  
	 GetModuleFileName(NULL,(LPSTR)chpath,sizeof(chpath));  
	 CString file;//=theApp.GetDirectory();
	 file.Format("%s",chpath);
	 CString vectorname;
	 file+="global\\vec\\*.vec";

	 m_list.ResetContent();
	 if (vectordir.FindFile(file))
	 {
	   while (vectordir.FindNextFile())
		{
			 vectorname=vectordir.GetFileTitle();
			 m_list.AddString(vectorname);
		}
	  vectorname=vectordir.GetFileTitle();
	  m_list.AddString(vectorname);

		vectordir.Close();
	}
}
开发者ID:github188,项目名称:MonitorSystem,代码行数:24,代码来源:SelectVectorDlg.cpp

示例14:

	_declspec(dllexport) void morph::loadAllModels(LPTSTR directoryPath, 
		std::vector<std::vector<morphPoint>*> *landMarkSets, 
		std::vector<std::vector<morphPoint>*> *densePointsSets)
	{
		for(int i=0; i<landMarkSets->size(); i++)
		{
			delete landMarkSets->at(i);
		}
		landMarkSets->clear();

		for(int i=0; i<densePointsSets->size();i++)
		{
			delete densePointsSets->at(i);
		}
		densePointsSets->clear();

		CString allFilePath;
		allFilePath.Append(directoryPath);
		allFilePath.Append(_T("*.pp"));
		CFileFind ppFinder;
		bool isAny=ppFinder.FindFile(allFilePath.GetBuffer(0));
		int num=0;
		while(isAny!=0)
		{
			isAny=ppFinder.FindNextFile();
			num++;
			std::vector<morphPoint> *vec=new std::vector<morphPoint>();
			readControlPointsFromPP((*vec), ppFinder.GetFilePath().GetBuffer(0));
			landMarkSets->push_back(vec);

			CString plyFilePath;
			plyFilePath.Append(directoryPath);
			plyFilePath.Append(_T("RegisteredFaces\\"));
			plyFilePath.Append(ppFinder.GetFileTitle());
			plyFilePath.Append(_T("_registered"));
			plyFilePath.Append(_T(".ply"));
			std::vector<morphPoint> *model=new std::vector<morphPoint>();
			readDensePointsFromPLY((*model),plyFilePath.GetBuffer(0));
			densePointsSets->push_back(model);
		}
	}
开发者ID:birolakgun,项目名称:3d-face-reconstruction,代码行数:41,代码来源:3DMorphLib.cpp

示例15: ShowTable

void ShowTable()
{
    CFileFind finder;

    int iRowN = 0;
    char loc[256];
	CString Dbn(CurDB);
    int iNameLen = 0,iTemp = 0;
	std::cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<'\n';
	std::cout<<"| Tables in ";
    std::cout << (LPCTSTR) Dbn;
    int strNum = Dbn.GetLength();
	for(iTemp = 19 - iNameLen-strNum;iTemp != 0;iTemp--)
		 std::cout<<' ';
	std::cout <<"|"<<'\n';
	std::cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<'\n';
	strcpy(loc,CurLocation);
	strcat(loc,"*.dbf");
    int bWorking = finder.FindFile(loc);

	while(bWorking)
	{
		 bWorking = finder.FindNextFile();
		 if (finder.IsDots())
			continue;
		 iRowN++;
         CString str = finder.GetFileTitle();
         iNameLen = str.GetLength(); 
		 std::cout <<"| "<< (LPCTSTR) str;
		 for(iTemp = 29 - iNameLen;iTemp != 0;iTemp--)
			 std::cout<<' ';
		std::cout <<"|"<<'\n';
	}
	std::cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<'\n';
	std::cout<<"There are" <<iRowN<<" rows in the table!";
	finder.Close();

}
开发者ID:V756568,项目名称:MiniSQL,代码行数:38,代码来源:Display.cpp


注:本文中的CFileFind::GetFileTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。