943,617 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 2254
  • C++ RSS
Sep 27th, 2009
0

Changing desktop to online .bmp image using c++ - help!!

Expand Post »
Hi guys

First post on this website, so go easy on me.

I'm a fairly inexperienced programmer, mostly using snippets of other people's code and adapting it for my own uses, but I have found a problem. I want to change my desktop programatically, but to a picture on the internet, not on my hard drive. I have included my current code. Is there anything I have to change to make it work, like an addition to the url of the picture?

The code compiles fine, but it just changes my desktop to grey instead of the image. Also, it works with any .bmp images on my hard drive.

c++ Syntax (Toggle Plain Text)
  1. #include <windows.h>
  2.  
  3. int main()
  4. {
  5. SystemParametersInfo( SPI_SETDESKWALLPAPER, 0, (PVOID) "http://www.deh.enr.state.nc.us/pws/rules/bitmap%20enr%20logo.bmp" , SPIF_UPDATEINIFILE ); // Just an example url
  6. }
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MaskedPianist is offline Offline
1 posts
since Sep 2009
Sep 28th, 2009
0

Re: Changing desktop to online .bmp image using c++ - help!!

maybe you'd have to use Curl or something to save the picture from the website onto your harddrive then call that function.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: class
Next Thread in C++ Forum Timeline: how to find a folder





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC