如何知道我的应用程序中已启用编辑器模式 [英] How to know that editor mode is on in my application

查看:101
本文介绍了如何知道我的应用程序中已启用编辑器模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中使用了4个视图,每个视图都有快捷键.当一个视图被激活时,我想忽略所有发送到另一视图的消息.例如当我在编辑视图的编辑控件中进行编写时,只有编辑控件会对按键做出反应,因此,其他视图都不应发生按键事件.

如何知道我在应用程序中进行编辑.即编辑器模式已开启.而不是将按键事件传递给另一个视图.因为它可能是另一个视图的快捷键

There are 4 views used in my application, I have shortcut keys for each. I want to ignore all the messages to the another views when the one view is activated. e.g. When I am writing in the edit control of the edit view only the edit control reacts to keypresses, so no another views should get the key pressed event .

How to know that i am editing in the application. i.e Editor mode is on . and not to pass the key pressed events to another view.? as it may be shortcut keys of that another view

推荐答案

我实际上并不太使用MFC Document/View体系结构,但是有关多个视图的MSDN文章可能帮助:

http://msdn.microsoft.com/en-us/library/s199bks0 (v = vs.80).aspx [
I don''t really use the MFC Document/View architecture much, but this MSDN article on multiple views may help:

http://msdn.microsoft.com/en-us/library/s199bks0(v=vs.80).aspx[^]

You should record which view you are in when switching from one to another, and then refer back to that when handling the key-press events.


这篇关于如何知道我的应用程序中已启用编辑器模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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