SPRING :: NOTE

[MFC] 디렉토리(폴더) 선택 다이얼로그 띄우기 본문

Development Language/C · C++ · MFC

[MFC] 디렉토리(폴더) 선택 다이얼로그 띄우기

RAYZIE 2017. 1. 18. 15:48
반응형
BROWSEINFO	brInfo;
ITEMIDLIST* pDirList;
char pszPath[500];
CString FPath = "";
brInfo.hwndOwner = NULL;	// GetSafeHwnd();
brInfo.pidlRoot = NULL;
memset(&brInfo, 0, sizeof(brInfo));
brInfo.pszDisplayName = pszPath;
brInfo.lpszTitle = ("폴더를 선택하세요.");
brInfo.ulFlags = BIF_RETURNONLYFSDIRS;

// DIalog Open
pDirList = ::SHBrowseForFolder(&brInfo);

if (pDirList != NULL)
	::SHGetPathFromIDList(pDirList, pszPath);

// Directory Path
FPath.Format("%s\\*.*", pszPath);


반응형
Comments