当前位置:网站首页>vs2019 使用向导生成一个MFC应用程序
vs2019 使用向导生成一个MFC应用程序
2022-07-06 09:14:00 【imxlw00】
创建项目
选择mfc模板
配置项目






运行

类视图

双击类名即可跳转到类声明所在的.h文件
下面为类中的成员函数,双击即可跳转到相应的定义部分

消息处理的添加

在CMainFrame添加消息处理,程序并没有反应,需要在view层操作上述过程。
在消息列表中找到WM_LBUTTONDOWN消息,添加。
工程文件增加几处改变。
第一处:在框架类头文件中添加了鼠标左键消息函数的函数声明
第二处:在框架类cpp文件中添加了消息映射宏
第三处:在框架列cpp文件中添加了处理鼠标左键消息的函数定义
void CMFCTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CView::OnLButtonDown(nFlags, point);
CString str;
str.Format(TEXT("x=%d , y=%d "), point.x, point.y);
MessageBox(str);
}

边栏推荐
- 报错解决 —— io.UnsupportedOperation: can‘t do nonzero end-relative seeks
- Django running error: error loading mysqldb module solution
- [Thesis Writing] how to write function description of jsp online examination system
- [AGC009D]Uninity
- QT creator test
- Base de données Advanced Learning Notes - - SQL statements
- 打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
- QT creator support platform
- In the era of DFI dividends, can TGP become a new benchmark for future DFI?
- QT creator shape
猜你喜欢

安装numpy问题总结

学习问题1:127.0.0.1拒绝了我们的访问

Rhcsa certification exam exercise (configured on the first host)

La table d'exportation Navicat génère un fichier PDM
![[recommended by bloggers] asp Net WebService background data API JSON (with source code)](/img/04/c721e6177b578b30cbbf334cb1b6c9.png)
[recommended by bloggers] asp Net WebService background data API JSON (with source code)
![[Thesis Writing] how to write function description of jsp online examination system](/img/f8/13144e0febf4a576bbcc3290192079.jpg)
[Thesis Writing] how to write function description of jsp online examination system

Introduction and use of automatic machine learning framework (flaml, H2O)
![[free setup] asp Net online course selection system design and Implementation (source code +lunwen)](/img/ac/b518796a92d00615cd374c0c835f38.jpg)
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)

02 staff information management after the actual project

引入了junit为什么还是用不了@Test注解
随机推荐
Django running error: error loading mysqldb module solution
Asp access Shaoxing tourism graduation design website
In the era of DFI dividends, can TGP become a new benchmark for future DFI?
L2-004 这是二叉搜索树吗? (25 分)
NPM an error NPM err code enoent NPM err syscall open
A trip to Macao - > see the world from a non line city to Macao
软件测试与质量学习笔记3--白盒测试
Navicat 導出錶生成PDM文件
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
Picture coloring project - deoldify
机器学习笔记-Week02-卷积神经网络
Summary of numpy installation problems
Solve the problem of installing failed building wheel for pilot
Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis
L2-006 树的遍历 (25 分)
Remember the interview algorithm of a company: find the number of times a number appears in an ordered array
Antlr4 uses keywords as identifiers
QT creator runs the Valgrind tool on external applications
AcWing 1294. Cherry Blossom explanation
Install mysql5.5 and mysql8.0 under windows at the same time