473,587 Members | 2,487 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 2179
> 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
2422
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 face. Say you have: class Car { virtual void speedup();
10
2669
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
5914
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 of the class – the numerator and the denominator. Provide a constructor that enables an object of this class to be initialized when it is declared....
11
2284
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 .... py> C().spam(3) spam spam spam
3
1919
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 init(obj): obj.do = A.do
7
5401
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 need to be updated with the current copy before being built. I also don't want projects being built with the old copy. Thanks! Bill
3
4866
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 the best method? Do you have a sample of how to do this?
13
3146
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 class which derived from the String class, add the function there and then we would all use the new class which contained my function and all of the...
2
1252
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 being able to load an assembly. Removing the class from the project and doing a rebuild all gets it working again. Its as though I've hit a...
11
18100
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 ListView columns so it should be doable, thanks
0
7849
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7973
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.