Solved

Customizing CFileDialog

Posted on 1997-04-06
1
1,205 Views
Last Modified: 2013-11-20
- I want my users to be able to change or pick directories by using a customized CFileDialog. To me this means: I want to turn the CFileDialog into a -let's call it a-  'CFolderDialog'. This CFolderDialog should not show files, but folders only.

- a related question:
Every article I've read about 'customizing the CFileDialog'  emphasizes on adding controls to the thing, not on how to remove them. E.g. I would like to hide the "Files of type" edit control. How to get its control ID?
0
Comment
Question by:gunnar
1 Comment
 
LVL 2

Accepted Solution

by:
rajesh032097 earned 100 total points
ID: 1300879
Hi,
You can call following method to hide the "file type" control in your CFolderDialog::OnInitDialog()
CFolderDialog::OnInitDialog()
{
 CFileDialog::OnInitDialog();
 /// other code
 CWnd* pParent = GetParent();
 /// cmb1 is the resource ID of the "File Type " combo box.
 /// the other combo box has ID of cmb2
 CWnd* c8 = pParent->GetDlgItem(cmb1);
 c8->ShowWindow(SW_HIDE);
 }

I hope it will work.
In fact there is a tricky way to get control ID's of all the controls in the CFileDialog class. If you want, I will give you that.
For other parameter settings, I hope you are using various flags given in the CFileDialog constructor.

0

Featured Post

IT, Stop Being Called Into Every Meeting

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

Suggested Solutions

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

21 Experts available now in Live!

Get 1:1 Help Now