Solved

Directories Search Dialog

Posted on 2000-05-06
6
172 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
Independent Software Vendors: 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 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