long SelectDownloadFolder()
{
// TODO: Add your dispatch handler code here
int result;
TCHAR szDir[ 4096 ];
BROWSEINFO bi;
LPITEMIDLIST pidl = NULL;
ZeroMemory( &bi, sizeof( BROWSEINFO ) );
bi.hwndOwner = this->GetSafeHwnd();
bi.lpfn = NULL;
bi.lParam = 0;
bi.lpszTitle = _T( "Choose download folder" );
bi.ulFlags = BIF_NEWDIALOGSTYLE;
pidl = SHBrowseForFolder( &bi );
if( pidl != NULL )
{
//
// 사용자가 디렉토리를 선택했다
//
result = SHGetPathFromIDList( pidl, szDir ); //szDir에 저장된 폴더가 들어감.
}
댓글 없음:
댓글 쓰기