Solved

Directory Selection Dialog Box

Posted on 1997-09-09
1
203 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

13 Experts available now in Live!

Get 1:1 Help Now