TCHAR fileName[ _MAX_PATH + 1 ];

m_showSelect.GetWindowText( fileName, _MAX_PATH );

BROWSEINFO bi;

::ZeroMemory( &bi, sizeof( BROWSEINFO ) );

bi.hwndOwner = GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = NULL;
bi.lpszTitle = _T("Select Folder to View");
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.lParam = NULL;
bi.iImage = NULL;

ITEMIDLIST* pidl = ::SHBrowseForFolder( &bi );
if ( pidl == NULL )
return;

const BOOL ret = ::SHGetPathFromIDList( pidl, fileName );
if ( ret )
m_showSelect.SetWindowText( fileName );

LPMALLOC pMalloc;
::SHGetMalloc( &pMalloc );
pMalloc->Free( pidl );
pMalloc->Release();