Solved

Accessing the windows inside CFilDialog...

Posted on 1998-04-05
4
172 Views
Last Modified: 2013-11-20
Hi,

I would like to know if it is possible to access all the individual windows that are present inside the CFileDialog's Win32 common file dialog. I am particularly interested to know what value I should pass to the GetDlgItem() function to get to the Look &In drop down tree control (?) which lists the hierarchy of folders. I am aware of other values (ie., cmb1, edt1, lst1) but I don't know the rest. Can anyone please offer advice on this ?? Thank you

Zafar
0
Comment
Question by:zafar030898
  • 2
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 120 total points
Comment Utility
All the values you need for the various controls in the system header file DLGS.H. You can use Spy++ to figure out which controls are which, or you can use the resource templates which are in your INCLUDE directory to sort it all out:

COLOR.DLG
FILEOPEN.DLG
FINDTEXT.DLG
FONT.DLG
ICMUI.DLG
MSACMDLG.DLG
OLEDLG.DLG
PRNSETUP.DLG

Once you know the ID of the control you want, using GetDlgItem() is the right thing to do.

.B ekiM
0
 

Expert Comment

by:q_dawg
Comment Utility
This works for all but the "SHELLDLL_DefView" and it's child "SysListView32" control.  If you want to hook the Space bar or something like that on the main list view,   for some reason GetDlgItem() doesn't work
0
 
LVL 11

Expert Comment

by:mikeblas
Comment Utility
I think you're actually referring to the "Places Bar".  That's a new feature of the newest shell--shipping with Windows 2000. The *.DLG files are still used for the rest of the client areas in the common dialogs, and there's no documented way to touch the list view control used for the places bar.

..B ekiM
0
 

Expert Comment

by:q_dawg
Comment Utility
Actually,  I was not referring to the "Places Bar",  but rather the ListView control with the files and their icons.  It turns out that the "SHELLDLL_DefView" and it's child "SysListView32" control get created AFTER the CDN_INITDONE notification message.  That's why I couldn't find them.  Even more interesting is that the "SysListView32" control gets destroyed and they re-created when you go up and down the folder heirarchy.  One ( not perfect ) solution is to check for the "SysListView32" contols' existance on the CDN_SELCHANGE and hook the control's proc then.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

11 Experts available now in Live!

Get 1:1 Help Now