MCPcopy Create free account
hub / github.com/cinience/RedisStudio / GetHtmlWindow

Method GetHtmlWindow

DuiLib/Control/UIWebBrowser.cpp:596–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596IDispatch* DuiLib::CWebBrowserUI::GetHtmlWindow()
597{
598 IDispatch* pDp = NULL;
599 HRESULT hr;
600 if (m_pWebBrowser2)
601 hr=m_pWebBrowser2->get_Document(&pDp);
602
603 if (FAILED(hr))
604 return NULL;
605
606 CComQIPtr<IHTMLDocument2> pHtmlDoc2 = pDp;
607
608 if (pHtmlDoc2 == NULL)
609 return NULL;
610
611 hr=pHtmlDoc2->get_parentWindow(&_pHtmlWnd2);
612
613 if (FAILED(hr))
614 return NULL;
615
616 IDispatch *pHtmlWindown = NULL;
617 hr=_pHtmlWnd2->QueryInterface(IID_IDispatch, (void**)&pHtmlWindown);
618 if (FAILED(hr))
619 return NULL;
620
621 return pHtmlWindown;
622}
623
624IWebBrowser2* DuiLib::CWebBrowserUI::GetWebBrowser2( void )
625{

Callers

nothing calls this directly

Calls 1

QueryInterfaceMethod · 0.45

Tested by

no test coverage detected