//MFC架构组成
//1.有CWinApp的派生类
//2.在全局区有定义派生类的对象
//3.在派生类中有virtual BOOL InitInstance()重写
//4.今后MFC软件工程就以派生类对象app中的InitInstance作为主函数
//另外,连接MFC的平台使用MFC静态链接库,或共享DLL都可以。 项目->属性->配置属性->常规->MFC的使用
//提前要删去twinmain函数,因为twinmain函数已经包含在InitInstance中了
class CMyapp :public CWinApp
{
virtual BOOL InitInstance()
{
MessageBox(NULL,L"win32转换为MFC软件工程",L"USA",MB_OK);
return TRUE;
}
};
CMyapp app;
//1.有CWinApp的派生类
//2.在全局区有定义派生类的对象
//3.在派生类中有virtual BOOL InitInstance()重写
//4.今后MFC软件工程就以派生类对象app中的InitInstance作为主函数
//另外,连接MFC的平台使用MFC静态链接库,或共享DLL都可以。 项目->属性->配置属性->常规->MFC的使用
//提前要删去twinmain函数,因为twinmain函数已经包含在InitInstance中了
class CMyapp :public CWinApp
{
virtual BOOL InitInstance()
{
MessageBox(NULL,L"win32转换为MFC软件工程",L"USA",MB_OK);
return TRUE;
}
};
CMyapp app;