| 594 | } |
| 595 | |
| 596 | IDispatch* 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 | |
| 624 | IWebBrowser2* DuiLib::CWebBrowserUI::GetWebBrowser2( void ) |
| 625 | { |
nothing calls this directly
no test coverage detected