CWebBrowser2获取html的内容

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);

  程序员的基础教程:菜鸟程序员

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