














Create an empty Win32 project.


Windows Desktop Wizard
d: VS2022 is the fourth version of v14.
14(17.14): 14 is the last minor version of VS2022.


Note:
You need to include "afxwin.h" in all header files.
Add constructor
public:
CMainWindow();
CMainWindow::CMainWindow()
{
Create(NULL, _T("Hello MFC"));
}
public:
virtual BOOL InitInstance();
BOOL CMyApp::InitInstance()
{
m_pMainWnd = new CMainWindow();
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
#include "CMainWindow.h"
Add it to MyApp.cpp
CMyApp myApp;
error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version.
Please #define _AFXDLL or do not use /MD[d]


此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。