Solved

Directory Selection Dialog Box

Posted on 1997-09-09
1
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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