码迷,mamicode.com
首页 > Web开发 > 详细

CWebBrowser2获取html的内容

时间:2016-06-14 16:06:54      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:

m_web为浏览器控件的变量名

	LPDISPATCH p=m_web.GetDocument(); 
	CComQIPtr<IHTMLDocument2,&IID_IHTMLDocument2> d=m_web.GetDocument(); 
	IHTMLElement* body;
	d->get_body(&body);
    CComBSTR context;
	body->get_outerText(&context);
    CString pcstr=	context.m_str;
	MessageBox(pcstr);

  

CWebBrowser2获取html的内容

标签:

原文地址:http://www.cnblogs.com/guohu/p/5584157.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!