Re: Retreiving the URL of the image in the web page

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



<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


.



Relevant Pages

  • Re: Running R remotely from a .NET application
    ... parameters into the model from my application and then retrieve the ... we dont> want to compile the model into an executable because it changes so ... [Short offer: data mining, operational research, ... time series forecasting, consulting] ...
    (sci.stat.consult)
  • Re: Reading data from a file using Ant
    ... >There dont seem to be any syntax that shows how i can retrieve a value. ... Want you want is a way to read a small amount of text from a file and ...
    (comp.lang.java.programmer)
  • Re: resource dll problem
    ... Same IDs in different dlls, one dll/language, explicitely LoadLibraryEx ... and use that handle to retrieve the resources. ... I dont really know. ...
    (microsoft.public.vc.mfc)
  • Re: Mackeral feathers
    ... hit the bottom before you start to sink & retrieve. ... If you dont get a ... bite after a few casts pick a different direction & try again. ...
    (uk.rec.fishing.sea)
  • Re: Retrieve ListBox Items
    ... Once I retrieve the correct item I want to be able to ... highlight that item ... With sufficient thrust, pigs fly just fine. ... -- RFC 1925 ...
    (microsoft.public.vc.language)