HRESULT timme = S_OK;
LPDISPATCH-pDispatch = m_wndBrowser.get_Document ();
om (pDispatch! = OGILTIGT)
{
IHTMLDocument2*-pHtmlDoc=NULL;
timme = pDispatch->QueryInterface (__uuidof (IHTMLDocument2), (annullera **), &pHtmlDoc);
IHTMLWindow2*- pWindow;
om (pHtmlDoc! =NULL)
{
timme = pHtmlDoc->get_parentWindow (&pWindow);
pHtmlDoc->Release ();
}
PÅSTÅ (EFTERFÖLJANDE (timme));
lång docheight=0;
IHTMLElement* pe=NULL;
pHtmlDoc->get_body (&pe);
IHTMLTextContainer* pe2=NULL;
om (pe! =NULL)
{
pe->QueryInterface (&pe2);
pe->Release ();
}
om (pe2! =NULL)
{
pe2->get_scrollHeight (&docheight);
pe2->Release ();
}
om (pWindow! =NULL&&docheight>0)
{
pWindow->scrollTo (0, docheight);
pWindow->Release ();
}
pDispatch->Release ();
}
|