#include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC 对 Windows 公共控件的支持
#endif // _AFX_NO_AFXCMN_SUPPORT
2.修改项目设置:
常规-MFC使用:在共享DLL中使用MFC
示例类:
// TestNetMFC.h
#pragma once
using namespace System;
namespace TestNetMFC
{
public __gc class Class1
{
// TODO: 在此添加此类的方法。
public:
System::String* Test(){
CString str="This is a test";
return new System::String(str);
}
};
}