我知道有CFileDialog,
有没有显示目录树的对话框?

解决方案 »

  1.   

    CString strPath;
    BROWSEINFO bi ={0}; 
    //Contains parameters for the SHBrowseForFolder 
    //function and receives information about  
    //the folder selected by the user. 
    char pszDisplayName[MAX_PATH] ="\0";
    bi.hwndOwner=NULL;
    bi.pszDisplayName = pszDisplayName;
    bi.lpszTitle="请选择目录:";
    bi.ulFlags=BIF_RETURNONLYFSDIRS;
    LPITEMIDLIST lpIL = SHBrowseForFolder(&bi);
    if(lpIL)
    {    
      SHGetPathFromIDList(lpIL,bi.pszDisplayName);
    }
    else
    {
      strPath = _T("");//return _T("");
    }
    strPath = /*return*/ bi.pszDisplayName;
      

  2.   

    http://www.helpwork.com/downdata/code/VC/vc_control/folder_dialog_source.zip