IDispatch* pElemDisp;
CComQIPtr<IHTMLElement>spElem(pElemDisp);
CComQIPtr<IHTMLElement>spParent;
spElem->get_parentElement(&spParent);主要是最后一句实在是不明白什么意思。
CComQIPtr<IHTMLElement>spElem(pElemDisp);
CComQIPtr<IHTMLElement>spParent;
spElem->get_parentElement(&spParent);主要是最后一句实在是不明白什么意思。
第二句是用这个指针来返回一个IHTMLElement接口的指针spElem。
第三句是定义个IHTMLElement接口的指针。
第四句是用指针sqElem中的get_parentElement方法得到父元素的指针并付给spParent。只是望文生义,希望对你的理解有帮助。