我要做一个录音程序让用户输入录音文件存放路径怎么用那个对话框?

解决方案 »

  1.   

    http://www.codeguru.com/Cpp/W-D/dislog/dialogforselectingfolders/article.php/c2019/
    http://www.codeguru.com/Cpp/W-D/dislog/dialogforselectingfolders/article.php/c1885/
      

  2.   

    CFileDialog dlg(TRUE,"","*.*");
    dlg.DoModal();
      

  3.   

    CPathDialog在哪儿定义的?
    MSDN里都找不到
      

  4.   

    http://www.vccode.com/file_show.php?id=2661超酷的路径/文件夹选取对话框
      

  5.   

    刚做过
    //顯示目錄選擇對話框
    BROWSEINFO bInfo;
    ZeroMemory(&bInfo, sizeof(bInfo));
    bInfo.hwndOwner = AfxGetMainWnd()->m_hWnd;
    bInfo.ulFlags = BIF_RETURNONLYFSDIRS;
    LPCITEMIDLIST pidList = ::SHBrowseForFolder(&bInfo);
    if (pidList == NULL)
    return;CString strPath;
    ::SHGetPathFromIDList(pidList,strPath.GetBuffer(_MAX_PATH));strPath.ReleaseBuffer();strPath就存储选择的文件路径
      

  6.   

    下面方法比较好
    BROWSEINFO bi;  
    char dispname[MAX_PATH], path[400];  ITEMIDLIST * pidl;bi.hwndOwner =hDlg;  
    bi.pidlRoot = 0;  
    bi.pszDisplayName = dispname;  
    bi.lpszTitle = "Choose Folder:";  
    bi.ulFlags = BIF_RETURNONLYFSDIRS;  
    bi.lpfn = 0;  
    bi.lParam = 0;  
    bi.iImage = 0;  if (pidl = SHBrowseForFolder(&bi))
    {  
    SHGetPathFromIDList(pidl, path);  
             strcpy(szSavedDirectory,path);}
      

  7.   

    多谢 huwei001982(編程浪子)  兄
      

  8.   

    自己直接写一个:
    BROWSEINFO bInfo;
    ZeroMemory(&bInfo, sizeof(bInfo));
    bInfo.hwndOwner = AfxGetMainWnd()->m_hWnd;
    bInfo.ulFlags = BIF_RETURNONLYFSDIRS;
    LPCITEMIDLIST pidList = ::SHBrowseForFolder(&bInfo);
    if (pidList == NULL)
    return;CString strPath;
    ::SHGetPathFromIDList(pidList,strPath.GetBuffer(_MAX_PATH));strPath.ReleaseBuffer();strPath就是选择的文件路径