在PreTranslateMessage中处理WM_LBUTTONDOWN消息,if ((pMsg->message == WM_LBUTTONDOWN) || (pMsg->message == WM_LBUTTONDBLCLK))
{
IHTMLDocument2* pdoc2=NULL;
IHTMLElement* pElement=NULL;CPoint point(pMsg->pt);
ScreenToClient(&point);
pdoc2 = (IHTMLDocument2 *)m_mybrowser.GetDocument();
BSTR bValue;
pdoc2->elementFromPoint(point.x,point.y,&pElement);
pElement->get_innerText(&bValue);
CString name(bValue);
AfxMessageBox(name);
}显示出来的是所有文档中的内容,我只想要鼠标点击的那个超级链接的内容,该怎么筛选呢?
谢谢。