16,472
社区成员
发帖
与我相关
我的任务
分享
HRESULT hr;
CComBSTR bstrText;
CComPtr <IHTMLElement> pBody;
hr = pDoc-> get_body(&pBody);
IHTMLSelectionObject *pSelObj = NULL;
pDoc->get_selection(&pSelObj);
IHTMLTxtRange *pText = NULL;
pSelObj->createRange((IDispatch**)&pText);
pText->select();
BSTR bstrTxt;
pText->get_htmlText(&bstrTxt);