Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with CFileDialog

Posted on 1998-10-06
4
Medium Priority
?
278 Views
Last Modified: 2013-11-20
I am probably missing something really stupid here, but when I try to call the contructor for CFileDialog, I get no default constructor available.  I am using CFileDialog as the constructor.  I don't get the error if I use CFontDialog or any of the other common dialog boxes.  What am I doing wrong?  Thanks.
0
Comment
Question by:Jothanin
[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
4 Comments
 
LVL 3

Accepted Solution

by:
shaig earned 60 total points
ID: 1323046
CFileDialog does not have a default constructor, you must specify one parameter atleast ( check the documentation ).
0
 

Expert Comment

by:gvnmsunil
ID: 1323047
I think the problem is with the parameters you had passed to the constructor.
If you can post the line for which you are facing problem it is better.
0
 

Author Comment

by:Jothanin
ID: 1323048
CFileDialog(TRUE, NULL, NULL, NULL, NULL) m_filedlg;

I am a newbie and have never had to mess with classes with no
default constructor, so that may be totally wrong.  With the parameters
I get:

 error C2629: unexpected 'class CFileDialog ('
error C2238: unexpected token(s) preceding ';'

as an error.

Thanks.
0
 
LVL 3

Expert Comment

by:shaig
ID: 1323049
Try
CFileDialog instanceName( TRUE );
Remember: your object name should be specified, you are not tring to declare the class again.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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 this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

618 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