| | |
Program to change desktop background
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2004
Posts: 217
Reputation:
Solved Threads: 0
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
many thx in advance
•
•
Join Date: Mar 2004
Posts: 1,620
Reputation:
Solved Threads: 51
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
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
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
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
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
![]() |
Similar Threads
- Can't change desktop background - NOT the usual problem (Windows NT / 2000 / XP)
- Desktop background won't change - Hijack Log Provided (Viruses, Spyware and other Nasties)
- Cannot change desktop background (Viruses, Spyware and other Nasties)
- windows xp desktop background problem (Viruses, Spyware and other Nasties)
- Desktop background locked out (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: Help with "operators overloading"
- Next Thread: Reading string with spaces frm file
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data database delete desktop developer directshow dll download dynamic encryption error file forms fstream function functions game generator getline givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






