Solved

Directories Search Dialog

Posted on 2000-05-06
6
171 Views
Last Modified: 2013-11-20
Usually, setup/installation programs have an option of Browse Directory, for the directory in which to install the program. This option creates a Directory Search dialog, much like standard File Dialog but with directory tree only. Is there a standard dialog like that? If yes, where does it hide? If no, how can I _efficiently_ create one?
0
Comment
Question by:Lescha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 2784266
You can do this by using CFileDialog in MFC.

CFileDialog dlg;
dlg.DoModal ();

For more ino check out the documentation for this dialog box class.
0
 
LVL 1

Author Comment

by:Lescha
ID: 2784341
I read and read and couldn't find how to force the CFileDialog to display only a directory tree, without the "files" window.

If there is a way to, please tell me.
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 2784391
You will have to look at the documentation for OPENFILENAME structure. HEre you can speify the filters for the file list control. Here is some notes from documentation.

nFilterIndex
-------------
Specifies the index of the currently selected filter in the File Types control. The buffer pointed to by lpstrFilter contains pairs of strings that define the filters. The first pair of strings has an index value of 1, the second pair 2, and so on. An index of zero indicates the custom filter specified by lpstrCustomFilter. You can specify an index on input to indicate the initial filter description and filter pattern for the dialog box. When the user selects a file, nFilterIndex returns the index of the currently displayed filter.
If nFilterIndex is zero and lpstrCustomFilter is NULL, the system uses the first filter in the lpstrFilter buffer. If all three members are zero or NULL, the system does not use any filters and does not show any files in the file list control of the dialog box.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Lescha
ID: 2785802
That's not what I meant!

Please re-read my question carefully: I meant the dialog which has an edit box, a tree control with directory and nothing more in it except for a few buttons.

It's no problem building one myself, but since every setup program has one, I thought maybe there is one somewhere.

If you are so sure about CFileDialog, could you please give a piece of code of how to use it for that end?
0
 
LVL 5

Accepted Solution

by:
proskig earned 30 total points
ID: 2787489
I think this is what you are looking for
http://home.earthlink.net/~railro/mfc_link.html
0
 
LVL 1

Author Comment

by:Lescha
ID: 2789567
Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 54
how do i create updater to My Activex application? 3 108
matchUp  challenge 6 82
modThree challenge 4 155
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question