在mfc应用程序中捕获键盘上按下的按键
我是 mfc 新手。我创建了一个 MFC 应用程序,我试图捕获是否按下了字符键。 我已将 ON_WM_CHAR 添加到消息映射中,并编写了一个 onChar 函数来在按下特定字符时执行某些功能。
但即使按下任何字符,我也无法达到 onChar 函数。
I am new to mfc. I have created an mfc application, I am trying to capture if character keys were pressed.
I have added ON_WM_CHAR to the message map and have written an onChar function to perform some function when a particular character is pressed.
But even if any character is pressed, I do not reach my onChar function.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你重载了哪个类的OnChar?大多数此类输入通常应在视图类中处理。
What class's OnChar have you overloaded? Most such input should typically be handled in a view class.