IWebBrowser2控件中的Tab键支持 [英] Tab key support in an IWebBrowser2 control
问题描述
我有一个嵌入的IWebBrowser2控件,它使用直接的C ++(带窗口的而不是没有窗口的),当有人按下Tab键在浏览器中的各个字段之间移动时,它将焦点从Web浏览器中移出.
I have an embedded IWebBrowser2 control using straight C++ (windowed, not windowless) and when someone hits the Tab key to go between fields in the browser, it jumps focus out of the web browser.
关于我需要实现什么或可能搞砸了什么的任何想法?
Any ideas on what I need to implement or what I could be screwing up?
谢谢!
推荐答案
诸如tab的加速键是在分发之前由消息循环处理的.因此,挂钩函数需要由消息循环调用- IOleInPlaceActiveObject :: TranslateAccelerator iirc. -使控件有机会进行键盘导航输入.
Accelerator keystrokes like tab are handled by the message loop before being dispatched. As such a hook function needs to be called by a message loop - IOleInPlaceActiveObject::TranslateAccelerator iirc. - to give the control the chance to do keyboard navigation type things.
这篇关于IWebBrowser2控件中的Tab键支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!