Solved

Directories Search Dialog

Posted on 2000-05-06
6
170 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
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 133
windows 10 how make picture as desktop background 2 65
wordmultiple challenge 12 142
Work with App store 7 68
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 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