Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC CFileDialog

Status
Not open for further replies.

EvilCabal

Programmer
Jul 11, 2002
206
CA
Hello,

This is the first time I use MFC and I'm a bit confused about many things so forgive me if my questions are a bit general.

I am trying to include a CFileDiagol in an existing projet that was not created as MFC (i.e. I created an empty project). The code compiles but as soon as I press the button witch call the dialog box I get a Debug assertion failed error, afxwin1.inl line 22. Now I know this code work because I got it from another projet thats uses MFC (properly :)) and it works.

So here are my questions :

1. Why doesn't it work :)

2. I noticed there is an include file in the working project named "stdafx.h". What is this file and how was it generated?

3. There are a lot of preprocessor directive I don't understand in the working project :

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

What are those, are they related to MFC?

4. There a lot of settings in under project settings refering to MFC (exemple : Under general, Microsoft fundation class). Where do I get explicit information on the meaning and effects of those settings?

Thanks a lot, do not hesitate to direct me to comprehensive website if my questions are to complex to be answered on a forum.

Thanks again.

Fred
 
I generally find with VC++ that it you are creating an app that uses MFC, then you should select a project from the wizard that is MFC based (rather than an "empty" project).

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top