标签: WebBrowser

MFC中针对WebBrowser控件增加link链接点击事件监控

本文参考互联网资源:http://www.scottdstrader.com/blog/ether_archives/000040.html
http://download.csdn.net/download/xiemg/3640190
前言:
本文是基于MFC对话框工程加入WebBrowser控件的实现,不是DHTMLView等的实现。目标是监控当前打开页面中的link超链接点击监控,并拦截事件做自定义处理。目的是把http链接转换成rtsp链接,然后本地播放该链接。

1. 主对话框头文件PlayerDlg.h:
1.1 增加头文件引用

#include <comdef.h>
#include <mshtml.h>
#include <mshtmdid.h>
#include <map>
#include <vector>
#include <afxwin.h>
using namespace std;

#pragma warning(disable : 4146) //see Q231931 for explaintation
#import <mshtml.tlb> no_auto_exclude

1.2[......]

阅读全文