Solved

Accessing the windows inside CFilDialog...

Posted on 1998-04-05
4
173 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
ID: 1317461
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
ID: 2847850
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
ID: 2854584
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
ID: 2863846
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

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

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 124
lucky13 challenge 11 123
sumHeights2  challenge 7 88
Annoying "thing" blocks my view 4 82
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: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

17 Experts available now in Live!

Get 1:1 Help Now