iwebbrowser 썸네일형 리스트형 GetActiveElement() IWebBrowser2 사용 시 현재 포커스가 있는 Element를 얻어오는 코드 조각 HRESULT ClassName::GetActiveElement(IHTMLElement** element0) { if (!element0) return E_INVALIDARG; HRESULT hr = E_FAIL; if (*element0) *element0 = NULL; CComQIPtr dispatch; hr = (*this)->get_Document(&dispatch); if (SUCCEEDED(hr) && dispatch) { CComQIPtr document2(dispatch); dispatch.Release(); while (document2) { CComQIPtr element; hr = document2.. 더보기 Document로부터 favicon url 정보 추출하기 template struct CaseInsensitiveCompare { public: bool operator()(Char x, Char y) const { return tolower(x) == tolower(y); } }; std::wstring GetFaviconUrlFromDocument(IHTMLDocument2* doc2) { if (!doc2) { return std::wstring(); } static std::wstring const linktag = L"LINK"; CComPtr ielemCol; CComPtr lnkelem; if (FAILED(doc2->get_all(&ielemCol))) { return std::wstring(); } CComPtr displink; CComQIP.. 더보기 이전 1 다음