Posted on 2012-11-28 11:34
盛胜 阅读(617)
评论(0) 编辑 收藏 引用
转载请注明出处谢谢:
char m_otherdbpath[MAX_PATH];
HWND pathhWnd=GetSafeHwnd();
BROWSEINFO bi;
LPITEMIDLIST pidl;
bi.hwndOwner = this->m_hWnd;
bi.pidlRoot = NULL;
bi.pszDisplayName = m_otherdbpath;
bi.lpszTitle = "选择输出文件路径";
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.lParam = NULL;
bi.iImage = NULL;
if((pidl = SHBrowseForFolder(&bi)) != NULL)
{
if(SUCCEEDED(SHGetPathFromIDList(pidl, m_otherdbpath)))//得到文件夹的全路径,不要的话,只得本文件夹名
{
m_edit_dbotherpath.SetWindowText(m_otherdbpath);
}
}