有没有显示目录的对话框? 我知道有CFileDialog,有没有显示目录树的对话框? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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; http://www.helpwork.com/downdata/code/VC/vc_control/folder_dialog_source.zip 两个程序能否同时访问数据库? 怎样自绘制系统菜单? vista休眠后系统会出现的问题 100份求助,请问如何控制对话框中控件的状态 请问:如何编程判断光驱,软驱,USB接口是启用状态还是禁用状态!谢谢! 推荐一些native API的资料~~~!!! vc中有什么办法清除DBF中删除的记录? 不知是我实在菜,还是根本上没有解决...,在线等候。 在线求助啊。。。。关于遍历注册表的程序 windows 8.1的系统默认字符集 在哪能找到计算机英文文章? 用vc连Access数据库,大侠救命,急!!!
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;