Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing file types in Save As dialog with CFileDialog

Posted on 1997-10-09
2
Medium Priority
?
636 Views
Last Modified: 2013-11-20
I'm using a CFileDialog class with a custom filter list such as "Windows Bitmaps (*.bmp)|*.bmp|Windows Metafile (*.wmf)|*.wmf||" and while the CFileDialog class does display these file types in the combo box, when the user chooses a type, the file name in the edit box does not update with the right extention. For example, if the user selects Windoes Metafile, I would expect the filename in the edit box to be changed to have the WMF extention. If Windows or MFC doesn't do this directly, I already know how to respond to OnTypeChange notifications but how can I change the filename in the dialog while it is still being displayed?
Thanks in advance.
0
Comment
Question by:Sherwin7
[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
2 Comments
 
LVL 4

Accepted Solution

by:
mbhakta earned 200 total points
ID: 1307889
Maybe the way you are trying to implement this is not correct. Here is a sample code which might help you.

CFileDialog fdlg( TRUE,"BMP","",0,   "Bitmap  image (*.BMP)|*.BMP|All files (*.*)|*.*||",this);

fdlg.DoModal();

Try this. This works for me.
0
 

Author Comment

by:Sherwin7
ID: 1307890
I am using the dialog for "Save As" the example you gave is for an "Open" dialog. Thanks anyways.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

688 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