MFC中的CFileDialog可以直接跳出对话框让你选择一个或者多个文件.那么,我想要选择一个文件夹如何做?是不是还要这个公共类?具体的例子就是Winamp选择文件夹的窗口.能够提供源码最好.50分.

解决方案 »

  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.   

    如何给分和结贴
            点击帖子右上的“管理”链接,进入管理页面,然后输入密码,并在要给分的回复的文本框中给出分数,然后点击给分按钮。具体操作请点这里查看。 
    结帖方法:
    1、在回复人后的文本框中填入分数,
    2、在密码文本框中输入密码,
    3、单击"给分"链接,
    4、等待页面重新生成才能关闭窗口。
    http://www.csdn.net/help/help.asp?bigclass=论坛帮助&smallclass=快速入门#如何给分和结贴