Solved

Customizing CFileDialog (!)

Posted on 1999-01-12
4
462 Views
Last Modified: 2013-11-20
I'm trying to customize the regular File open/ save as dialog box!
-I have to change the layout a bit, add a bitmap in the background etc. etc. -DON'T ask why! :)

I have had no problems with making my own class which inherits from CFileDialog, and I've even been able to make it process CFileDialog's messages, but that's as far as I've been able to go.. pretty new with MFC..

I want to access the resource of the dialog. -change it, and maybe add a control or two.

Can I somehow access control-variables of the controls? -What are their names?

Can I make a new dialog for the class to use? -In that case; what resource ID's must the controls have in order for the superclass to be able to use them? Where can I find that information?

Thanks beforehand
/Torbjörn Josefsson
0
Comment
Question by:toblo
4 Comments
 
LVL 3

Expert Comment

by:plaroche
ID: 1327529
Microsoft Systems Journal, january 1998, C++ Q&A Section.

There is a good example of this, explains all the things you need to know about the file dialog.

If you can't find the article at www.msj.com, post a comment here with your email, I'll send it to you.
0
 

Author Comment

by:toblo
ID: 1327530
Thanks for the tip, but the article doesn't tell me how I can access the dialog-resources or the controls.. in fact it says that the code supplied will not work! :)

I think I would need the resource ID's or something. -Wish I could give you the points, but I can't afford it for anything less than an answer.
0
 
LVL 4

Accepted Solution

by:
nil_dib earned 100 total points
ID: 1327531
You can acces the contols with GetDlgItem().
With this method you can get the pointer to the combobox, editfield ...
The names for the controls are in <dlgs.h>
Don't forget to include this file.
Look also at www.codeguru.com for CFileDialog derived classes such
as bitmap preview dialogs.
0
 

Expert Comment

by:wwwky
ID: 1327532
you can create an own dlg and  plus in the file open/save dialog in it.
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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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, fr…

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

14 Experts available now in Live!

Get 1:1 Help Now