Solved

MFC DirDialog?

Posted on 1998-05-24
6
517 Views
Last Modified: 2013-12-03
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
Comment
Question by:poisson68
  • 2
  • 2
  • 2
6 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1403627
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
 

Author Comment

by:poisson68
ID: 1403628
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
 
LVL 23

Expert Comment

by:chensu
ID: 1403629
You can find the source code to do so at http://www.codeguru.com/dialog/dir_dialog.shtml. Windows NT does support it.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 

Author Comment

by:poisson68
ID: 1403630
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
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1403631
Actualy, I compiled inunder Win95 and got the same error. I just commected out that lines, and everything went fine
0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1403632
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

Suggested Solutions

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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