Solved

Accessing the windows inside CFilDialog...

Posted on 1998-04-05
4
177 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tab names are off by one 5 54
Complete beginner needs help making a cron job 9 125
wait notify demo infinite loop 3 122
Making an alias 7 101
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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