By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,279 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

how to use MFC in C++/CLI

P: n/a
ma
Hello,

I have several classes in C++/MFC that I would like to use when I am
using C++/CLI windows form.

I did create a windows form application in VC2005 and when I am trying to
add my class to it, it doesn't accept them and generate error compiling MFC
header files.

I think the problem is somewhere in project setup. Currently it is /clr:pure
which I think means that I can only use pure CLI objects. What can I do to
solve the problem? Is there any document that show how I can use MFC based
classes in windows form?

Best regards
Mar 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi ma!
I have several classes in C++/MFC that I would like to use when I am
using C++/CLI windows form.

I did create a windows form application in VC2005 and when I am trying to
add my class to it, it doesn't accept them and generate error compiling MFC
header files.
Which errors? This should be possible...
I think the problem is somewhere in project setup. Currently it is /clr:pure
which I think means that I can only use pure CLI objects.
Yes. This might lead to problems... you should use "/clr"...
What can I do to
solve the problem? Is there any document that show how I can use MFC based
classes in windows form?


AFAIK, the documented way is to use Windows-Forms inside MFC-Apps...
http://blog.kalmbachnet.de/?postid=70

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Mar 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.