[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 559
  • Last Modified:

MFC DirDialog?

does any one know how to create a simple dialog like this:This pic can be found on http://www.cyberway.com.sg/~chinteng/dir.jpgIs there any MFC built-in class that I can make use of and could you please tell me the details on how to do it, perhaps the steps involved. Thanx alot :)
0
poisson68
Asked:
poisson68
  • 2
  • 2
  • 2
1 Solution
 
MikeP090797Commented:
If you reffering to a dialog that allows you to select a directory, like when you clikc the 'Browse' button in most application, you can use ShBrowseForFolder API
0
 
poisson68Author Commented:
Thanx for the pointer MikeP, do you know the NT version since ShBrowseForFolder only works for Win95. Is there other API that works with NT. Or if I try to map the directory structure with a CTreeCtrl, will it be cumbersome and involves lotsa steps...? Thanx :)
0
 
chensuCommented:
You can find the source code to do so at http://www.codeguru.com/dialog/dir_dialog.shtml. Windows NT does support it.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
poisson68Author Commented:
Whenever the header file "shlobj.h" is used, my compilation alwiz got problem

G:\MSDEV\INCLUDE\shlobj.h(1079) : error C2501: 'NETRESOURCE' : missing decl-specifiers
G:\MSDEV\INCLUDE\shlobj.h(1079) : error C2146: syntax error : missing ';' before identifier 'nr'
G:\MSDEV\INCLUDE\shlobj.h(1079) : error C2501: 'nr' : missing decl-specifiers

Above are the three line that I get everytime I make a compilation. It's not part of my source, I supposed... BTW, I compile my program in NT Server
0
 
MikeP090797Commented:
Actualy, I compiled inunder Win95 and got the same error. I just commected out that lines, and everything went fine
0
 
chensuCommented:
It seems that you are using Visual C++ 4.0. Edit your StdAfx.h and take out #define VC_EXTRALEAN.
0

Featured Post

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.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now