|
-
May 11th, 1999, 01:53 AM
#8
Re: CFileDialog: problem with resource ID. I am desperate, please help
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();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|