Solved

Directory Selection Dialog Box

Posted on 1997-09-09
1
204 Views
Last Modified: 2013-12-03

I am trying to find some information on the directories
list box found under the directories tab of the Tools Options dialog box in Visual C++ 4.2.  Double clicking on a blank line int the box brings up a button on the right hand side of the line with three dots.  Pushing this button brings up a dialog similar to file open but only shows directories which can be chosen.  I would assume the list box stuff is done through sub-classing but any info would be appreciated.  Finally is this directory open dialog box something I can use such as the File Open or Color Selection dialog or is it designed specifically by Microsoft for this product???
         Thanks in advance,
                   Derek
0
Comment
Question by:derekl
1 Comment
 
LVL 2

Accepted Solution

by:
tarang earned 50 total points
ID: 1406274
I doubt very much that the list box is sub-classed.  It would be
much easier to use DlgDirList function to populate the list box.
However a much better method exists.  Use GetOpenFileName and in
the OPENFILENAME structure give it an lpfnHook where you can
intercept the WM_INITDIALOG and WM_COMMAND messages.  You can
then hide and resize the dialog and then get whatever the user
does.  If messing around with the dialog at run-time is not
palitable to you then you can always load a copy commdlg.dll into
VC and look at it's resources.  You can then copy the File Open
dialog and modify it.  You can then pass the copied and modified
resource as the lpTemplateName in the OPENFILENAME structure.

All common dialogs: Find, Font, Color, Open, Save, have API calls
and can be modified in similar methods to those described above.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

18 Experts available now in Live!

Get 1:1 Help Now