943,831 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 20721
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Aug 10th, 2004
1

Program to change desktop background

Expand Post »
Hi everyone. I heard that it is possible to code up a small program to randomly change windows desktop bg pic. I havent got any code (as i dont know how to do it) so could some plz tell me, or direct me to a site or something. Btw this isnt homework, just something im curious about!

many thx in advance
Similar Threads
Reputation Points: 13
Solved Threads: 0
Posting Whiz in Training
marceta is offline Offline
217 posts
since May 2004
Aug 10th, 2004
0

Re: Program to change desktop background

Hello,

I would guess that this is handled by the Windows Registry. You can make what is called a .reg file that inserts information into the registry. You could write a C++ code to prompt the user the desktop options, and then have the C++ program make the registry edit. You would also need to specify if you want the current user to only receive the edit, or the whole bunch.

Do a search on Windows Desktop Registry. See what you find.

Christian
Team Colleague
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
kc0arf is offline Offline
1,629 posts
since Mar 2004
Aug 10th, 2004
0

Re: Program to change desktop background

i did a search of the registry, although i used fairly clear keyterms, i coudlnt find anything. Thanks for the help though Christian. Does anyone know how to do it?
Reputation Points: 13
Solved Threads: 0
Posting Whiz in Training
marceta is offline Offline
217 posts
since May 2004
Aug 11th, 2004
1

Re: Program to change desktop background

Actually you can do this programatically fairly easily...
Using Windows API's SystemParametersInfo with SPI_SETDESKWALLPAPER.

http://msdn.microsoft.com/library/de...metersinfo.asp

I don't program in Win32 anymore, so the if you get stuck try looking here:
http://www.c-sharpcorner.com/Code/20...eWallpaper.asp
You should be able to figure out which constants correspond to the given values in the example.

Have fun!


Ed
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004
Aug 11th, 2004
0

Re: Program to change desktop background

thx a lot, massive help. just 1 question. What thing in "File->New" do i click on in Microsoft Visual C++?. thnx again
Reputation Points: 13
Solved Threads: 0
Posting Whiz in Training
marceta is offline Offline
217 posts
since May 2004
Aug 20th, 2004
0

Re: Program to change desktop background

New Project?
Reputation Points: 17
Solved Threads: 1
Junior Poster
cosi is offline Offline
153 posts
since Aug 2004
Aug 24th, 2004
0

Re: Program to change desktop background

...what kind of project?
Last edited by alc6379; Aug 24th, 2004 at 1:04 pm. Reason: misspelled what
Reputation Points: 13
Solved Threads: 0
Posting Whiz in Training
marceta is offline Offline
217 posts
since May 2004
Mar 17th, 2007
-1

Re: Program to change desktop background

Click to Expand / Collapse  Quote originally posted by marceta ...
...what kind of project?
Hmmm...well it appears that you're in Visual C++ so what kind of project do you think that a person might make in a C++ IDE? This isn't rocket science my friend....
Last edited by missionpilot; Mar 17th, 2007 at 1:08 am.
Reputation Points: 9
Solved Threads: 0
Newbie Poster
missionpilot is offline Offline
5 posts
since Oct 2006
Mar 17th, 2007
0

Re: Program to change desktop background

Hmmm...well it appears that you're in Visual C++ so what kind of project do you think that a person might make in a C++ IDE? This isn't rocket science my friend....
After nearly 3 YEARS, do you really think that the OP cares?
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Mar 17th, 2007
0

Re: Program to change desktop background

After nearly 3 YEARS, do you really think that the OP cares?
Haha, I found this while looking for something else on Google. I never even checked the date. I'm sorry.
Reputation Points: 9
Solved Threads: 0
Newbie Poster
missionpilot is offline Offline
5 posts
since Oct 2006

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: Help with "operators overloading"
Next Thread in C++ Forum Timeline: Reading string with spaces frm file





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


Follow us on Twitter


© 2011 DaniWeb® LLC