ex)
ITEMIDLIST *pidlBrowse;
char pszPathname[MAX_PATH];
char pszPathname[MAX_PATH];
BROWSEINFO BrInfo;
BrInfo.hwndOwner = NULL; //GetSafeHwnd();
BrInfo.pidlRoot = NULL;
BrInfo.hwndOwner = NULL; //GetSafeHwnd();
BrInfo.pidlRoot = NULL;
memset( &BrInfo, 0, sizeof(BrInfo) );
BrInfo.pszDisplayName = pszPathname;
BrInfo.lpszTitle = "복사할 디렉토리를 선택하세요";
BrInfo.ulFlags = BIF_RETURNONLYFSDIRS;
BrInfo.pszDisplayName = pszPathname;
BrInfo.lpszTitle = "복사할 디렉토리를 선택하세요";
BrInfo.ulFlags = BIF_RETURNONLYFSDIRS;
// 다이얼로그를 띄우기
pidlBrowse = ::SHBrowseForFolder(&BrInfo);
pidlBrowse = ::SHBrowseForFolder(&BrInfo);
if( pidlBrowse != NULL)
{
// 패스를 얻어옴
::SHGetPathFromIDList(pidlBrowse, pszPathname);
}
{
// 패스를 얻어옴
::SHGetPathFromIDList(pidlBrowse, pszPathname);
}
[출처] [본문스크랩] mfc - 폴더 선택 다이얼로그 띄우기 . |작성자 상쾌한아침
댓글 없음:
댓글 쓰기