Solved

Directory Picker in VC++ 6.0 with MFC

Posted on 2000-04-30
5
338 Views
Last Modified: 2013-11-20
I want to get a directory through a dialog. There is a standard dialog that allows you to select a file, but not only a directory. Also, I cannot use ActiveX (WinNT).
How can I manage that?

0
Comment
Question by:ToniVR
  • 2
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 10 total points
ID: 2764065
Unfortunately, there's no MFC class to help you.  But there is an API: SHBrowseForFoder(). It'll present a dialog htat lets the user browse for a folder throughout their system.

..B ekiM
0
 
LVL 44

Expert Comment

by:bruintje
ID: 2764071
Hi TonyVR,

A bit of a trick...but couldn't you selct the file and cut of the filename to get the directory selected?

or try MS
http://support.microsoft.com/support/kb/articles/Q105/4/97.asp

The DIRPK sample was designed using the old style of common file dialogs and will work as intended only on Windows NT 3.51. On Windows 95 and future versions of NT (4.0), if you want to use the old style of common file dialogs, insure that:

HTH:O)Bruintje
0
 
LVL 2

Author Comment

by:ToniVR
ID: 2766135
I've already found some code to manage the problem. But thanx anyway!!!
0
 
LVL 2

Author Comment

by:ToniVR
ID: 2766150
Bruintje, I tried to use the DIRPK sample, but it didn't work properly (or I couldn't manage to implement it). But some other dude at C++ Programming Questions gave me a small, but very efficient sollution!
0
 
LVL 44

Expert Comment

by:bruintje
ID: 2766209
that's okay glad you got it working!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
paragon account problem 9 96
not able to insert into temp table 68 150
Named range not carried over 10 57
MaxSpan challenge 9 67
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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 demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now