Solved

Customizing CFileDialog (!)

Posted on 1999-01-12
4
475 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

705 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