473,513 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding an mfc class

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.
Nov 16 '05 #1
2 2173
> 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
Nov 16 '05 #2
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.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2421
by: Andrew Ward | last post by:
Hi All, Sorry if this is off topic, but I could not seem to find a suitable OO Design newsgroup. If there is one feel free to let me know. Here is a simplification of a general design problem I...
10
2661
by: sp0 | last post by:
Is there a reason why to make mix numbers improper when adding? It seems when subtracting and adding, adding a subtracting the whole numbers and fraction parts should be sufficient? what'ch think
5
5908
by: surrealtrauma | last post by:
the requirement is : Create a class called Rational (rational.h) for performing arithmetic with fractions. Write a program to test your class. Use Integer variables to represent the private data...
11
2270
by: Steven D'Aprano | last post by:
Suppose I create a class with some methods: py> class C: .... def spam(self, x): .... print "spam " * x .... def ham(self, x): .... print "ham * %s" % x .......
3
1912
by: Gabriele *darkbard* Farina | last post by:
Hi, there is a way to add methods to an object dynamically? I need to do something like this. I remember python allowed this ... class A(object): def do(s, m): print m @staticmethod def...
7
5388
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
3
4858
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
13
3134
by: Rob Meade | last post by:
Hi all, I have written a small ProperCase function which I would like to make available to our team at work through our common class library. A colleague mentioned that I could write a new...
2
1245
by: Dave Calkins | last post by:
I'm wriiting an MFC C++ application which uses a third party C# .NET API via a DLL. The app runs fine. If I add a new, empty C++ class, and compile/link it refuses to run, complaining about not...
11
18075
by: Pete Kane | last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would contain tab pages of my own classes, I know you can achieve this with...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.