IWebbrowser2中的Tab键不起作用 [英] Tab key doesn't work in IWebbrowser2
问题描述
我正在使用ActiveX控件在ATL应用程序(IWebbrowser2)中实现嵌入式浏览器。问题是,我不能使用tab键在文本字段之间跳转。按Tab键不起作用。按Enter键按预期提交表单。
问题存在,例如在facebook登录网站上。
如何使选项卡键正常工作?必须激活ATL控件中的某些东西才能使其发挥作用?
I am using an ActiveX control to implement an embedded browser in an ATL app (IWebbrowser2). The problem is, that I can't jump between text fields using the tab key. Pressing the tab key just does nothing. Pressing the Enter key submits the form as expected. The problem exists e.g. on the facebook login site. How can I make the tab key work properly? Must I activate something in the ATL control to make this work?
谢谢!
Fabian
推荐答案
本文介绍如何在C中使用IWebBrowser2:
http://www.codeproject.com/KB/COM/cwebpage.aspx
This article describes a way how to use IWebBrowser2 in C: http://www.codeproject.com/KB/COM/cwebpage.aspx
在下面的一些评论中,人们有完全相同的问题。似乎IWebBrowser2只是有错误,并没有将键盘消息(不只是TAB,但也CTRL + C等)转换为预期的操作。在某些评论中有一个解决方法:
http://www.codeproject.com/Messages/3558959/Re-hot-key-not-work.aspx
In some comments below it, people have exactly the same problem. Seems IWebBrowser2 just has bug and does not translate keyboard messages (not just TAB, but also CTRL+C etc.) to the expected actions. In some comment there has been a workaround: http://www.codeproject.com/Messages/3558959/Re-hot-key-not-work.aspx
然而,我不了解ActiveX,所以我不知道这可以在你的情况下使用。
However I have no knowledge about ActiveX so I have no idea if this is usable in your case.
这篇关于IWebbrowser2中的Tab键不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!