|
-
May 10th, 1999, 09:20 AM
#1
Q: how to get SHBrowseForFolder to return ...
... the full path that is selected. it seems to return only the last node of the path. for example:
C:\program files\devstudio\bin
if i use the dialog that it displays to work my way down to the "bin" directory, and select it, the returned value, (i.e. the pszDisplayName), is only "bin". i kind of need to know the whole thing?
maybe SHBrowseForFolder is not the routine that i should be using.
thanks for any help you can provide.
craig
[email protected]
code snipit of how i'm using it follows:
char path[MAX_PATH];
memset(path,sizeof(MAX_PATH),0x00);
CString cszTitle = _T("Please select a path");
BROWSEINFO browseinfo;
browseinfo.hwndOwner = this->GetSafeHwnd(); // HWND
browseinfo.pidlRoot = NULL; // LPCITEMIDLIST
browseinfo.pszDisplayName = path; // LPSTR
browseinfo.lpszTitle = cszTitle; // LPCSTR
browseinfo.ulFlags = 0; // UINT
browseinfo.lpfn = NULL; // BFFCALLBACK
browseinfo.lParam = NULL; // LPARAM
browseinfo.iImage = NULL; // int
SHBrowseForFolder(&browseinfo);
if (strlen(path)>0){
m_myeditControl.SetWindowText(path);
}
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
|