HRESULT Stunde = S_OK;
LPDISPATCH pDispatch = m_wndBrowser.get_Document ();
wenn (pDispatch! = NULL)
{
IHTMLDocument2* pHtmlDoc=NULL;
Stunde = pDispatch->QueryInterface (__uuidof (IHTMLDocument2), (Lücke **) &pHtmlDoc);
IHTMLWindow2* pWindow;
wenn (pHtmlDoc! =NULL)
{
Stunde = pHtmlDoc->get_parentWindow (&pWindow);
pHtmlDoc->Release ();
}
ERKLÄREN (GEFOLGT (Stunde));
langes docheight=0;
IHTMLElement* pe=NULL;
pHtmlDoc->get_body (&pe);
IHTMLTextContainer* pe2=NULL;
wenn (PET! =NULL)
{
pe->QueryInterface (&pe2);
pe->Release ();
}
wenn (pe2! =NULL)
{
pe2->get_scrollHeight (&docheight);
pe2->Release ();
}
wenn (pWindow! =NULL&&docheight>0)
{
pWindow->scrollTo (0, docheight);
pWindow->Release ();
}
pDispatch->Release ();
}
|