MFC应用程序中的虚拟键 [英] Virtual Keys in MFC application

查看:122
本文介绍了MFC应用程序中的虚拟键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何在没有类向导的情况下在MFC中实现虚拟键处理程序.消息映射宏和处理程序声明在哪里?

Hi,
How do I implement Virtual Key Handlers in MFC without the Class Wizard. Where are the Message Map Macro''s and the Handler Declarations?

推荐答案

在头文件中,连同类声明一起使用宏DECLARE_MESSAGE_MAP()

在cpp文件中,放置以下宏-
In the header file, withing the class declaration, use the macro DECLARE_MESSAGE_MAP()

In the cpp file put the following macros -
BEGIN_MESSAGE_MAP(CDerivedClass, CBaseClass)
    ON_WM_KEYDOWN()
END_MESSAGE_MAP()


这篇关于MFC应用程序中的虚拟键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆