My requirement is that the user should be able to select only folders and not the files. Is there a way to show files as disabled (grayed out) in the listbox so that the only option is to select folders ?
ReplyOriginally posted by: Dennis
After clicking on the 'Show Dialog' button, the application crashes on the line
pFD->GetDlgItem(edt1)->GetWindowRect(rectCurrFolderEB);
It looks like the pFD->GetDlgItem(edt1) return a NULL pointer.
This does not happen in VC6.0. Any idea on how to resolve this?
Dennis
ReplyOriginally posted by: liaohuanlin
as title
Originally posted by: Kevin Jackman
Adding 'else return NULL' seems to fix it
if(AfxMessageBox(cstrPath + _T("\n") + _T("\n") +_T("This path does not exist. Do you want to create it?"),
I have inherited this code from a colleague,so I apologise if this comment is inaccurate.
When the "This path does not exist, do you want to create it?" dialog appears, selecting 'NO' creates it anyway.
MB_YESNO | MB_ICONQUESTION) == IDYES)
{
.....
}
else return NULL; // this line has been added
Reply
Originally posted by: David
show it , user objects will add and donn't release.
how to resolve it?
Originally posted by: Alan
Does anyone know if a unicode version of this call exists ?
Originally posted by: Rick Bogard
I noticed that when you use the "?" button to get help, that the "Select" button displays the help for an "Open" button. Is there any way to change this behavior?
ReplyOriginally posted by: Carnegie
Is it possible to force the user to select an existing directory?
I've tried using both OFN_FILEMUSTEXIST and OFN_PATHMUSTEXIST, but neither changes the behaviour of the dialog box if a nonexistant path is entered in the text box - the 'Path does not exist, do you wish to create it' message is still displayed.
I want the user to be able to type the path as well as select it with the mouse, so I can't just set the edit box to Read Only.
Still a great piece of code though.
ReplyOriginally posted by: Shirly Armin
Hi,
I use this class and it's very cool , BUTTT -->
When trying to select a folder from the network :
for example : "\\websql\student\" ,
an Error Message Box ""Invalid Folder" is displayed.
I'v found your remark in the source :
//If the user has entered something like
"c:\\windows\\\\system"
//this is invalid but _access returns valid if this string is passed to
//it. So before giving it to _access validate it.
So, This is A Problem!!!!!!!
ReplyOriginally posted by: Tuong Dam
I found some side effects on testing the CSelectFolderDialog for selecting only directory. The class works very well with all kind of file extensions except the Microsoft Shortcut Link files and files with double dots (very rare species).
I can fix the file filtering string "*..*" with double dots by adding more dots "*....*", but not too much luck on the Microsoft Shortcut Link files. Can anyone please try to help out? Thank You Beddy Much!