16,551
社区成员
发帖
与我相关
我的任务
分享
BROWSEINFO bi;
ITEMIDLIST *pidl;
bi.hwndOwner = NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = Dir;
bi.lpszTitle = "选择一个目录";
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.lParam = 0;
bi.iImage = 0;
pidl = SHBrowseForFolder( &bi ); /* Display "Select Folder" dialog box, Get the folder name and convert it into a ITEMLIST data structure. */
if ( pidl == NULL )
Dir[0] = 0;
if (!SHGetPathFromIDList( pidl, Dir )) /* Retrieve folder name from ITEMLIST structure. */
Dir[0] = 0;