?
Solved

Problem with CFileDialog

Posted on 1998-10-06
4
Medium Priority
?
275 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 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