Adding an mfc class

  • Thread starter Thread starter Jim Townsend
  • Start date Start date
J

Jim Townsend

Hi all,

I have a project that was written in studio 6, and has now been
converted/rebuilt in .NET 2003. Everything was going fine until I went
to add a new dialog.

I created the dialog, went to project->add class, chose mfc class,
filled in the required fields, and pressed "Finish". All that happened
was an error message saying "Object Required", and no files were
created. I then tried adding a class by double clicking on the dialog
resource, and this resulted in no error message, but no class/files
either.

Ive seen that other people have had this problem, but it doesnt seem
to have been answered.

The strange thing is that its worked fine on other projects we have,
but they are smaller. Could it be the size of the solution? It is a
large project.

Hope someone can shed some light, at the moment Im having to go back
to studio 6 to create the class, and then bring the files back over,
which isnt ideal.

TIA,

Jim.
 
I have a project that was written in studio 6, and has now been
converted/rebuilt in .NET 2003. Everything was going fine until I went
to add a new dialog.

I created the dialog, went to project->add class, chose mfc class,
filled in the required fields, and pressed "Finish". All that happened
was an error message saying "Object Required", and no files were
created. I then tried adding a class by double clicking on the dialog
resource, and this resulted in no error message, but no class/files
either.

I did not get the error message. However, I am not getting creation
of the new class cpp and .h files ! ! ! I too have a large project, well
over 500 classes and 200,000 lines of code.

This is not good !

No Thanks,
Lynn McGuire
 
I had exactly the same problem.
It happens when the files stdafx.h and stdafx.cpp are not in the project.
To fix it do the following:
1. Create a new MFC project using the wizard.
2. Copy and add stdafx.h and stdafx.cpp your old project.
3. Include stdafx.h in your main frame file.
4. Now you can delete the NEW project.

Good luck.
Doron Ben-Ari.
 
Back
Top