当前位置:网站首页>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);
}
边栏推荐
- Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis
- [Thesis Writing] how to write function description of jsp online examination system
- LeetCode #461 汉明距离
- 01项目需求分析 (点餐系统)
- L2-004 这是二叉搜索树吗? (25 分)
- AcWing 179. Factorial decomposition problem solution
- Pytorch基础
- Cookie setting three-day secret free login (run tutorial)
- Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
- La table d'exportation Navicat génère un fichier PDM
猜你喜欢
error C4996: ‘strcpy‘: This function or variable may be unsafe. Consider using strcpy_s instead
Asp access Shaoxing tourism graduation design website
一键提取pdf中的表格
La table d'exportation Navicat génère un fichier PDM
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
基于apache-jena的知识问答
Solve the problem of installing failed building wheel for pilot
Idea import / export settings file
Kept VRRP script, preemptive delay, VIP unicast details
How to build a new project for keil5mdk (with super detailed drawings)
随机推荐
L2-004 这是二叉搜索树吗? (25 分)
double转int精度丢失问题
Antlr4 uses keywords as identifiers
记一次某公司面试题:合并有序数组
Use dapr to shorten software development cycle and improve production efficiency
Some notes of MySQL
A trip to Macao - > see the world from a non line city to Macao
Solve the problem of installing failed building wheel for pilot
解决安装Failed building wheel for pillow
How to configure flymcu (STM32 serial port download software) is shown in super detail
neo4j安装教程
QT creator runs the Valgrind tool on external applications
[Thesis Writing] how to write function description of jsp online examination system
Postman uses scripts to modify the values of environment variables
[recommended by bloggers] C # generate a good-looking QR code (with source code)
SSM整合笔记通俗易懂版
UDS learning notes on fault codes (0x19 and 0x14 services)
【博主推荐】SSM框架的后台管理系统(附源码)
Leetcode 461 Hamming distance
Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path