就好象ACDsee同时读取很多图片一样的功能。

解决方案 »

  1.   

    一定要用CFileDialog 吗?
      

  2.   

    在m_ofn.nMaxFile 中设置缓冲区,你定义的,能放多少是多少了。
      

  3.   

    POSITION pos;
    CString strFilename;
    CFileDialog FileDlg(TRUE,"txt",NULL,OFN_HIDEREADONLY|OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ALLOWMULTISELECT, "Text Files(*.txt)|*.txt|All Files(*.*)|*.*|");
    FileDlg.m_ofn.nMaxFile = 100 * MAX_PATH; //100 Files
    FileDlg.m_ofn.lpstrFile = new TCHAR[FileDlg.m_ofn.nMaxFile];
    ZeroMemory(FileDlg.m_ofn.lpstrFile, sizeof(TCHAR) * FileDlg.m_ofn.nMaxFile);
    if(FileDlg.DoModal() == IDOK)
    {
        pos = FileDlg.GetStartPosition();
        while(pos)
        {
            strFilename = FileDlg.GetNextPathName(pos);
            AfxMessageBox(strFilename);
        }
    }