Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image, or any content, from the internet. 1

Status
Not open for further replies.

PrintNET

MIS
Sep 30, 2002
30
0
0
US
Is it possible to pull an image from the internet? Like having a small window, which will just be an image from the internet. And if the internet image changes, the clientside image should as well. How would one go about doing this?
 
Well to go through a web server you have to poll since HTTP is not a session based protocol. Then of course you have to be able to consume the image data and render it to your device context.

In Visual C++ using MFC it’s fairly simple using the CInternetSession etc. classes to obtain the resource if you have an URL for it.

After that you have to be able to render it in your window which is a whole other issue and not so simple since different image formats are involved. There is a COM control that can be used to render JPEG and maybe even GIF files I can’t remember for sure. It uses a COM IStream interface I think. It’s been several years since I worked with it. I don’t remember what platforms it is available in. You can get all the information including sample code on MSDN.



-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top