Originally posted by: Stephan Rose
Where can I find the ID's of the other controls int he CFileDialog ohter than that combo box???
ReplyOriginally posted by: David Hepburn
"While the program works fine for every other directory, it does not get rid of folders in the Windows directory."
The reason for this problem showing up is that the API call
"Known Problems"
GetFileAttributes() returns the file attributes as a bit mask and if you replace lines 81 and 82 in customfiledlg.cpp
which read as follows:
int val = GetFileAttributes(szItemName);
if(val == FILE_ATTRIBUTE_DIRECTORY)
to:
int val = GetFileAttributes(szItemName);
if((val & FILE_ATTRIBUTE_DIRECTORY) != 0)
which masks out just the directory attribute the problem goes away.
The reason for this is that the directories in the Windows directory have other
attributes as well as those of FILE_ATTRIBUTE_DIRECTORY.
Originally posted by: Inna
Hi,
I want to run your project,
but TBBUTTONINFO is undefined and I cannot find it in
Visual C++ (version 5.0).
Can you help me?
Thanks,
Inna
Originally posted by: Randy Pitz
This example demonstrates a very good concept. There are a number of ways that developers may want to modify the common file dialogs, and MS has made this difficult indeed!
Have you, or anyone else ever tried to modifiy the contents in the combobox? The purpose being to limit the user's choice for where to open/save files. There are some good reasons to do this that I won't go into here.
For instance it would be nice to 'root' the file dialog at, say the user profile directory. Taken a step further it would be nice to present the user any number of unrelated (by file-system or network location) top level folders that could be used for file open/save. I've only been able to do this through my own implementation of the file dialog that is not based on the common file dialog, but looks very similar.
Reply