Re: Retreiving the URL of the image in the web page
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Tue, 9 May 2006 08:01:25 -0400
<yasodhai@xxxxxxxxx> wrote in message
news:1147169157.436375.82140@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
I displayed the web page in the Webbrowser Control using the Navigate
Method. I want to retrieve the URL of the image which is embedded in
the web page. I came to know that using Gethref method I can retreive
the URL of the image. But I dont know how to do. Kindly help me. I
want to retreive the URL in a string variable.
The code is as follows:
MSHTML::IHTMLDocument2Ptr pDoc= m_browser.GetDocument();
MSHTML::IHTMLElementCollectionPtr pAllElems= pDoc->all;
MSHTML::IHTMLImgElementPtr imge=pAllElems->item("mqmapsearch");
//mqmapsearch is the id of the image I want to retreive
_bstr_t url = imge->href;
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- References:
- Retreiving the URL of the image in the web page
- From: yasodhai@xxxxxxxxx
- Retreiving the URL of the image in the web page
- Prev by Date: Re: Saving the content of the webbrowser control
- Next by Date: Using the class value for the Item method
- Previous by thread: Retreiving the URL of the image in the web page
- Next by thread: Using the class value for the Item method
- Index(es):
Relevant Pages
|