Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi is it possible to add MFC support to a WIN32 app (not a console app)

Thanks
Posted

Set project->Settings->"Use MFC in a Static Library"

remove #include "Windows.h" from stdafx.h

add #include "afxwin.h" to main project file
 
Share this answer
 
v2
The question makes little sense. MFC is nothing but the library. The fact that MFC application project can be started from appropriate template means nothing; this template is provided just for convenience. You can always start using the libraries you want at any time later.

However, here is a simple practical advice: create a brand new MFC application from this template. Look at the project options to see how the library is referenced. As this is C++, this is a matter of referencing some header files and some library files. And add it all to your existing project you are developing. For detail of using MFC classes and how they are related to raw Windows API, address the MFC documentation.

—SA
 
Share this answer
 
Comments
shiftwik 1-Mar-15 20:36pm    
thanks... MFC is a framework

Sergey Alexandrovich Kryukov 1-Mar-15 21:43pm    
Already trying to help you. What else would you need to achieve your goals?
—SA
shiftwik 1-Mar-15 23:13pm    
Thanks... I want to be able to use MFC capabilities within a WIN32 (non console) application. Specifically how do I setup a standard WIN32 App to use CString and CDatabase classes among others? I have scoured MSDN and the internet and can't find any examples of using MFC within a WIN32 (non console) application.
thanks
Sergey Alexandrovich Kryukov 1-Mar-15 23:41pm    
Just use them... What's the problem?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900