BROWSEINFO bi;
char name[MAX_PATH];
ZeroMemory(&bi,sizeof (BROWSEINFO));
bi.hwndOwner = GetSafeHwnd();
bi.pszDisplayName = name;
bi.lpszTitle = " 选择文件夹 " ;
//bi.ulFlags = BIF_USENEWUI;
bi.ulFlags = BIF_RETURNFSANCESTORS;
LPITEMIDLIST idl = SHBrowseForFolder(&bi);
if (idl == NULL)
return ;
SHGetPathFromIDList(idl, folderPath.GetBuffer(MAX_PATH));
folderPath.ReleaseBuffer();
实现浏览文件夹功能
最新推荐文章于 2021-10-25 14:43:04 发布