HRESULT hora = S_OK;
pDispatch de LPDISPATCH = m_wndBrowser.get_Document ();
se (pDispatch! = ZERO)
{
pHtmlDoc=NULL de IHTMLDocument2*;
hora = pDispatch->QueryInterface (__uuidof (IHTMLDocument2), (vácuo **) &pHtmlDoc);
pWindow de IHTMLWindow2*;
se (pHtmlDoc! =NULL)
{
hora = pHtmlDoc->get_parentWindow (&pWindow);
pHtmlDoc->Release ();
}
AFIRMAR (SUCEDIDO (hora));
docheight=0 longo;
pe=NULL de IHTMLElement*;
pHtmlDoc->get_body (&pe);
IHTMLTextContainer* pe2=NULL;
se (pe! =NULL)
{
pe->QueryInterface (&pe2);
pe->Release ();
}
se (pe2! =NULL)
{
pe2->get_scrollHeight (&docheight);
pe2->Release ();
}
se (pWindow! =NULL&&docheight>0)
{
pWindow->scrollTo (0, docheight);
pWindow->Release ();
}
pDispatch->Release ();
}
|