help me! I don't obtain the point of IHTMLElement through IHTMLDOMNode! why?  
Author Message
kakamilan





PostPosted: Visual C++ Express Edition, help me! I don't obtain the point of IHTMLElement through IHTMLDOMNode! why? Top

my code:

CComQIPtr<IHTMLDOMNode>pRootNode(lpParentDisp);

CComPtr<IDispatch> spChildren;
if(FAILED(pRootNode->get_childNodes(&spChildren)))return;
CComQIPtr<IHTMLDOMChildrenCollection> pChildColl(spChildren);

long lCount = 0;
pChildColl->get_length(&lCount);
for (long l = 0;l<lCount;l++)
{
CComPtr<IDispatch> spChild;
pChildColl->item(l,&spChild);
CComQIPtr<IHTMLDOMNode> pChild(spChild);
CComQIPtr<IHTMLElement> pElement(pChild); // I don't obtain the point

}

please somebody help me ! thanks........




Visual Studio Express Editions34