热泪求助:工作重压下,请大家帮一把。急!急!急!

superzxq 2004-11-22 07:49:49
我用MFC ActiveX Wizard生成一个最简单的OCX框架,在其中插入一个Dialog,包含两个Edit,Button。
在ActiveX控件的Create函数中创建这个Dialog,当我在网页中引入这个OCX后,
我dialog上的Edit对键盘的Backspace,left,right按键失效了,但是对其他输入和del有效。
我参考了http://www.microsoft.com/mind/0499/faq/faq0499.asp
但还是没有解决问题,上司不停在催我,混不下去了!
请大家帮一把!

<html>
<head>
<title>dialogcontrol</title>
</head>
<body>

<center>
<object id="dialogcontrol" classid="clsid:371EA21B-CD61-4E9B-88D3-1D83BEFBB0F6"
height=300 width=500>
</object>
</center>

</body>
</html>
...全文
180 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
superzxq 2004-11-23
  • 打赏
  • 举报
回复
问题解决!
我安装了一个消息钩子。
再次感谢freeshoot(巴蒂刘)的帮助!
再次感谢!!!
freeshoot 2004-11-22
  • 打赏
  • 举报
回复
Accelerator keys, such as ARROW keys, are first received by the message pump of the ActiveX control's container. Even if the control has the focus, it does not receive messages for keystrokes that have special meaning to control containers, such as ARROW and TAB keys. MFC ActiveX controls have a chance to intercept these messages by overriding their PreTranslateMessage function.

However, PreTranslateMessage is not always called for an MFC ActiveX control.

RESOLUTION
Install a Windows WH_GETMESSAGE hook for the modeless dialog box/propertysheet derived class to allow it to intercept keystrokes and handle accelerators.
...

Q168777 PRB: MFC ActiveX Control in IE Doesn't Detect Keystrokes
Q180402 PRB: MFC ActiveX Control Ignores ARROW Keys on VB Container
Q187988 PRB: ActiveX Control Is the Parent Window of Modeless Dialog
Q199431 PRB: Enabling Menu Mnemonics in an MFC ActiveX Control
Q194294 HOWTO: Add Toolbars and Tooltips to ActiveX Controls

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧