On Mar 9, 2:01 pm, "dolphin" <jdxyw2...@gmail.comwrote:
Hi!Nice to see you!
I hava a problem.
How to use a MFC's Class in Console?For example I want to use CString
in a win32 console program.What should I do?Sorry for my poor English.
My previous answer was based on Visual C++ 7.1 onwards.
In Visual C++ 6.0
You have to
* Include 'afx.h' in one of your main headers
* Open the menu 'Project -Settings'. On the 'General' register
of the settings dialog box choose 'Use MFC in a Shared DLL' or 'Use
MFC in a Static Library' from the drop down box called 'Microsoft
Foundation Classes'.
now you can use CString in your application. But it's adviced to use
std::string or std::wstring instead of CString in Pure C++
applications. else your code will not be portable.