CFileDialog: I want to select only a path, not a filename
Hey Folks
I am currently developping an application where i need to store a file in a certain directory.
The filename is determined by the application, but the path isn't.
If I use a filedialog, i need to select a file, before i can click ok.
Is it possible to only take the path of the directory without selecting a filename?
I really hope someone can help me solve my problem asap.
Thanks in Advance
Re: CFileDialog: I want to select only a path, not a filename
if you want to allow the user to select a folder, use the ShBrowseForfolder API
Re: CFileDialog: I want to select only a path, not a filename
If you are using CFileDialog and DoModal you can use GetPathName(); instead of GetFileName();
Hope this helps
Louise
Re: CFileDialog: I want to select only a path, not a filename
I hope that using of OFN_NOVALIDATE flag in CFileDialog constructor will solve your problem
Zorik