18,356
社区成员
发帖
与我相关
我的任务
分享
IHTMLDocument2=CWebBrowser2.xxxxxx;
CComPtr<IHTMLDocument3> pDocument3;
IHTMLDocument2->QueryInterface(IID_IHTMLDocument3,(void**)&pDocument3);
CComPtr<IHTMLElement> tagElement;
pDocument3->get_documentElement(&tagElement);
CComBSTR bstr;
tagElement->get_outerHTML(&bstr);//整个网页的HTML源码(你不需要这行)
tagElement->get_outerText(&bstr);//整个网页的文本(也就是你要的)