现在的位置: 首页 > 综合 > 正文

SHBrowseForFolder 用法

2012年06月13日 ⁄ 综合 ⁄ 共 445字 ⁄ 字号 评论关闭

 

 1  char path[500];
 2  BROWSEINFO br;
 3  ITEMIDLIST *item;
 4  br.hwndOwner = this->GetSafeHwnd();
 5  br.iImage = 0;
 6  br.pszDisplayName = 0;
 7  br.lParam = 0;
 8  br.lpfn = 0;
 9  br.lpszTitle = "请选择路径:";
10  br.pidlRoot = 0;
11  br.ulFlags = BIF_RETURNONLYFSDIRS|BIF_USENEWUI|BIF_BROWSEINCLUDEFILES;
12  item = SHBrowseForFolder(&br);
13 
14  if( item!= NULL ) //Non-CANCEL
15  {
16    if (SHGetPathFromIDList(item,path)==TRUE)
17    {
18    }
19  }
20 

 

 

抱歉!评论已关闭.