http://blog.csdn.net/skyereeee/article/details/7412754

http://blog.csdn.net/pc620/article/details/6372251

    str_dir = str_file_path.Left(str_file_path.ReverseFind('\\'));

    
    CFileFind fileFinder; 
    CString filePath = str_dir + _T("\\*.*");
    bfind_all_file = fileFinder.FindFile(filePath); 

    while(bfind_all_file) 
    { 

        bfind_all_file = fileFinder.FindNextFile(); 
        CString str_file_path_tmp = fileFinder.GetFilePath();
        dot_pos = str_file_path_tmp.ReverseFind('.');
        str_file_suffix = str_file_path_tmp.Right(str_file_path_tmp.GetLength() - dot_pos);

        
        if( _T(".yuv") == str_file_suffix)  
        {
            file_count = m_list.GetItemCount();
            m_list.InsertItem(file_count, str_file_path_tmp,0);
        } 
    } 
    fileFinder.Close();