- open file dialog
- Posted by David on May 11th, 2007
Hi all,
is it possible to open a file dialog and don't let user change the
file name I give and disable the cancel button of that dialog?
Thanks.
- Posted by Grinder on May 11th, 2007
David wrote:
It sounds like what you're wanting the user to select is a directory.
Maybe you should just use a directory selection dialog instead?
As far as not permitting the user to cancel, that's just bad design. If
there's some operation that cannot be continued until a
directory/filename is provided, then disable that--not the user's
ability to back out of a dialog.
- Posted by David on May 11th, 2007
On May 10, 10:15 pm, Grinder <grin...@no.spam.maam.com> wrote:
Thanks for your reply. but I don't want user to select a directory. I
don't want the user can select something when the dialog opens, I will
give the file name and he only click the ok button to open the file. I
know this is weired,but my application really needs that Could someone
give me some hints?
- Posted by Grinder on May 11th, 2007
David wrote:
If the user can't select the directory or filename why even have a file
selection dialog?
- Posted by Jack Klein on May 11th, 2007
On 10 May 2007 19:23:40 -0700, David <clamayi@gmail.com> wrote in
comp.os.ms-windows.programmer.win32:
That still doesn't make sense. Why do you need the file open dialog,
which has the purpose of allowing the user to select a directory and
path, if he can't select the directory and path?
If your program reaches a point where hang and not allow the user to
do anything else but open the file, why don't you just open it without
asking the user? You won't let him do anything else, not even quit
the program (short of using the task manager), so what's the point of
even asking the user to click OK?
If for some reason you need the user to click OK to open a file, when
you already know what file it is and the user can't change it, make
your own dialog box that says "Going to Open The File Now", and maybe
the name of the file, and only put an OK button on it.
I tend to agree with Grinder, that is really sounds like a bad user
interface, but you might have a reason that we don't see.
The user is used to the standard dialog box that allows selecting
drives, folders, and files, and allows him to cancel if he changes his
mind. It works that way in every other program he runs. If you are
going to do something that works in a completely different way, don't
use that dialog box. Otherwise that is really bad design.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html