07-17-2006 10:25 AM
hi,
i know i am replying to this thread after a long time.. but i am having the same problem with frames in CVI.
1.I used IE activeX.
2. i got document IUnknown interface pointer from the ie Handle.
SHDocVw_GetProperty (ieHandle, 0, SHDocVw_IWebBrowser2Document, CAVT_UNKNOWN, &pUnk);
3.i got the document object from interface pointer
status=pUnk->lpVtbl->QueryInterface (pUnk,&IID_IHTMLDocument2, (void *)&document);
4.i got frames collection after that.
document->lpVtbl->get_frames(document,&pElem);
5. i was able to get the no of frames after that
pElem->lpVtbl->get_length(pElem,&leng);
6.I got the document object for the IHTMLWindow2
VARIANT ci,cl;
IHTMLWindow2 pWindow;
ci.n1.n2.vt=VT_UINT;
ci.n1.n2.n3.lVal=frameindex;//int frame index;
pElem->lpVtbl->item(pElem,&ci,&cl);
status=cl.n1.n2.n3.pdispVal->lpVtbl->QueryInterface(cl.n1.n2.n3.pdispVal,&IID_IHTMLWindow2,(LPVOID*)&pWindow);
status=pWindow->lpVtbl->get_document(pWindow,(void *)&document1);
After this step, i tried to iterate throug the frames.i success fully went through the first frame which is 'MAIN'
but i was not able to get the document object for the second frame.i am getting the same document object again and again.
i dont get what i am doing wrong.
regards,
Radha R
07-18-2006 05:18 PM