当前位置:网站首页>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);
}

边栏推荐
- 误删Path变量解决
- 01项目需求分析 (点餐系统)
- [蓝桥杯2017初赛]方格分割
- How to configure flymcu (STM32 serial port download software) is shown in super detail
- 【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
- 基于apache-jena的知识问答
- Ansible practical series I_ introduction
- AcWing 242. A simple integer problem (tree array + difference)
- [Thesis Writing] how to write function description of jsp online examination system
- Why can't I use the @test annotation after introducing JUnit
猜你喜欢

Request object and response object analysis

When you open the browser, you will also open mango TV, Tiktok and other websites outside the home page

软件测试与质量学习笔记3--白盒测试

Asp access Shaoxing tourism graduation design website

Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis

02 staff information management after the actual project

机器学习--人口普查数据分析

解决安装Failed building wheel for pillow

QT creator test

Machine learning notes week02 convolutional neural network
随机推荐
软件测试与质量学习笔记3--白盒测试
一键提取pdf中的表格
Dotnet replaces asp Net core's underlying communication is the IPC Library of named pipes
[蓝桥杯2020初赛] 平面切分
Detailed reading of stereo r-cnn paper -- Experiment: detailed explanation and result analysis
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
Some notes of MySQL
Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
Codeforces Round #753 (Div. 3)
AcWing 1298. Solution to Cao Chong's pig raising problem
The virtual machine Ping is connected to the host, and the host Ping is not connected to the virtual machine
QT creator support platform
Copie maître - esclave MySQL, séparation lecture - écriture
One click extraction of tables in PDF
Asp access Shaoxing tourism graduation design website
Swagger、Yapi接口管理服务_SE
QT creator uses Valgrind code analysis tool
How to configure flymcu (STM32 serial port download software) is shown in super detail
误删Path变量解决
JDBC principle