首页 > Web开发 > 详细

CWebBrowser2获取html的内容

时间:2016-06-14 16:06:08      阅读:246      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!