# MfcLib **Repository Path**: huangshangbin/MfcLib ## Basic Information - **Project Name**: MfcLib - **Description**: No description available - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-20 - **Last Updated**: 2021-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 基于MfcLib的Mfc应用创建步骤(vs 2015): 1 新建mfc项目,设置名称,路径。 基于对话框 ---> 下一步,去掉系统菜单 完成 2 Release x64 3 删除自动生成对话框文件和资源。 4 添加对话框资源 IDD_BLOCK 设置属性无边框 ,添加对话框资源 IDD_START_MAIN, 设置属性无边框 5 添加类 BlockDlg, StartMainDlg 对话框类。 删除 BlockDlg.h .cpp StartMainDlg.h .cpp 6 复制 src 文件夹到 resource.h 所在目录。 复制 res/dlg 文件夹到 res 目录。 显示所有文件 src 包含在项目中 7 替换 项目名.cpp 71--92行的代码 SetRegistryKey(_T("应用程序向导生成的本地应用程序"));之后 --- if (pShellManager != NULL)之前的 AfxInitRichEdit2(); BlockDlg::createDlg(); 替换第 7 行 代码, #include 8 resource.h 第9行 #define IDB_START_MAIN_BK 10001 9 项目名称.rc 第66行 // // Bitmap // IDB_START_MAIN_BK BITMAP "res\\dlg\\StartMain\\bk.bmp" 10 stdafx.h 第40行 #if defined _M_IX86 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") #elif defined _M_IA64 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") #elif defined _M_X64 #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") #else #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #endif 11 IDD_START_MAIN 原型图像 添加 添加按钮 IDC_CLOSE X 12 src所在目录添加 include文件夹 复制 pull_library.bat 到 include文件夹 运行 复制 pull_mfc.bat 到 include文件夹 运行 include 右键 包含在项目中 13 属性 常规 --> 字符集 --> 使用多字节字符集 vc++目录 --> 包含目录 --> 项目路径, include包含进去 14 属性 配置属性 c++ 预处理器 预处理器定义 WIN32_LEAN_AND_MEAN c/c++ --> 常规 --> SDL检查 --> 否 15 include\library\dataStruct\private\jsonla.cpp 属性 --> c/c++ --> 预编译头 不使用预编译头 include\library\utils\private\sole.cpp 属性 --> c/c++ --> 预编译头 不使用预编译头 include\library\utils\private\HardDriveSerialNumer.cpp 属性 --> c/c++ --> 预编译头 不使用预编译头 include\library\network\ws\WsClient.cpp 属性 --> c/c++ --> 预编译头 不使用预编译头 include\library\enDecrypt\base64\base64.cpp 属性 --> c/c++ --> 预编译头 不使用预编译头 说明: 1 AppControl::init() 统一创建对话框。