本帖最后由 a898540348 于 2011-05-13 06:28:08 编辑

解决方案 »

  1.   

    http://blog.csdn.net/mycaibo/archive/2010/11/11/6002334.aspx
      

  2.   

    http://www.pudn.com/downloads178/sourcecode/windows/activex/detail824868.html
      

  3.   


    void FindFile(CString strPath,CString keyFile)
    {
        CString            strTemp;
        CFileFind        fileFinder;    BOOL    bIsFinded    = fileFinder.FindFile(strPath+_T("\\*.*")); 
        while (bIsFinded) 
        { 
            bIsFinded = fileFinder.FindNextFile();         if(!fileFinder.IsDots()) 
            {
                strTemp    = fileFinder.GetFilePath();
                if(fileFinder.IsDirectory())
                    FindFile(strTemp,keyFile);
                else
                {
                    if(!strcmp(strTemp.Right(strTemp.GetLength()-strTemp.ReverseFind('\\')-1),keyFile))
                       m_strFilesSrc.Add(strTemp);
                }
            }
        } 
        fileFinder.Close();
    }
      

  4.   

    6楼写的很完整,那两天我刚给已哥们也写了这,呵呵。不过是用这两个函数:
    FindFirstFile
    FindNextFile;