I simply can not get the desired results, use the following code directly, please!!!!!!
Void CWeb_TestDlg: : OnDocumentCompleteExplorer1 (LPDISPATCH pDisp and VARIANT FAR * URL)
{
//TODO: Add your the control notification handler code here
Cstrings info;
BSTR BSTR.
HRESULT HRESULT=S_OK;
IHTMLElement * pElement1=NULL;
IHTMLElement * pElement2=NULL;
IHTMLDocument2 * pDoc=(IHTMLDocument2 *) m_web GetDocument ();
If (NULL!=pDoc)
{
HResult=pDoc - & gt; Get_body (& amp; PElement1);
If (S_OK==hResult & amp; & NULL!=pElement1)
{
HResult=pElement1 - & gt; Get_parentElement (& amp; PElement2);
If (S_OK==hResult & amp; & NULL!=pElement2)
{
HResult=pElement2 - & gt; Get_outerHTML (& amp; BSTR);
If (S_OK==hResult)
{
PDoc - & gt; Release ();
PDoc=NULL;
PElement1 - & gt; Release ();
PElement1=NULL;
PElement2 - & gt; Release ();
PElement2=NULL;
}
}
}
}
The else
{
If (NULL!=pDoc)
{
PDoc - & gt; Release ();
PDoc=NULL;
}
If (NULL!=pElement1)
{
PElement1 - & gt; Release ();
PElement1=NULL;
}
If (NULL!=pElement2)
{
PElement2 - & gt; Release ();
PElement2=NULL;
}
return;
}
Info=BSTR;
SysFreeString (BSTR);
}
CodePudding user response:
Asked the great spiritCodePudding user response:
CodePudding user response:
Save as HTML web pages to see, whether to have multiple files? See if there was any clueCodePudding user response:
Obviously pages with AJAX, so the DocumentComplete page elements has not been created, such as the end of the script to visit again, also can wait for a few seconds with timer,Like the score immediately suggests that this could have been run script, that's no way out, can brush with timer,
CodePudding user response: