如何捕捉某些浏览事件 [英] How to catch certain browsing events

查看:77
本文介绍了如何捕捉某些浏览事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在开发一个带有ATL的BHO,因为我需要编写一个应用程序来记录用户和浏览器在浏览互联网时的交互。
我的BHO由于DIID_DWebBrowserEvents2接口,我能够获得事件通知。通过这种方式,我可以记录何时打开新窗口,导航页面,打印模板等等。但是这只是处理了我想捕获的一半事件。我还要记录的是用户按下后退,前进和刷新按钮,保存页面或链接内容,添加书签等。我无法从DWebBrowserEvents2接口获得有关这些事件的通知。
我如何管理获取此信息? (有人告诉我"子类化IE标准工具栏"来截取工具栏中托管的按钮的WM_COMMANDS消息;它是一种好的,直接的方式吗?)
我已经了解C ++,但我是不习惯编写处理MS技术的代码,所以除了给我一些提示来回答我的问题,如果你甚至可以指出我的一些代码片段将非常感谢!

感谢所有给谁的建议他/她的意见!
问候,

Davide Magistri

解决方案

以下是DHTML方法。 http://msdn.microsoft.com/workshop/author/dhtml/reference/methods.asp


作为一个具体的例子,"返回"功能在这里描述:http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/back.asp

希望能为您指明正确的方向。搜索结果,威廉结果

Hi everyone,
i'm currently developing a BHO with ATL as i'm in need to write an application that would record the interaction between a user and the browser while surfing the internet.
With my BHO i'm able to get notification of the events thanks to the DIID_DWebBrowserEvents2 interface. This way i can record when new windows are opened, a page is navigated to, a print template is istantiated and so on.
But this just takes care of half of the events i'd like to catch. What i'd like to record too is when a user presses the back, forward and refresh button, saves a page or the content of a link, adds a bookmark, and similar. I can't get notifications of those events from the DWebBrowserEvents2 interface.
How could i manage in getting this information? (Someone told me about "subclassing the IE standard toolbar" to intercept the WM_COMMANDS messages from the buttons hosted in the toolbar; is it a good and straightforward way to do it?)
I already know C++, but i'm not used to write code dealing with MS tecnologies, so beside giving me a few tips to answer my question if you could even point me to some code snippets would be largely appreciated!

Thanks in advice to everyone who will gave his/her input!
Regards,

Davide Magistri

解决方案

Here are the DHTML methods. http://msdn.microsoft.com/workshop/author/dhtml/reference/methods.asp


As a specific example, the "back" functionality is described here: http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/back.asp

Hope that aims you in the right direction.

William


这篇关于如何捕捉某些浏览事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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