Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1018
  • Last Modified:

Wallpaper

I know how to change wallpaper by win32 call SystemParametersInfo with SPI_SETDESKWALLPAPER as paramater. Can I also change background pattern and display (tile or center) by any function call? Or are there any other methods that I can change these settings without using control panel's "Display" program. In other word, can I change these settings winthin my program? Many thanks!  
0
pai
Asked:
pai
1 Solution
 
2goodCommented:
In Windows 95, this information is stored both in the [Desktop] section in WIN.INI and in the registry under the HKEY_CURRENT_USER\Control Panel\desktop key. I am not sure which one is superior the other.

Wallpaper=C:\WINDOWS\NETSCAPE.BMP
TileWallpaper=1
Pattern=254 2 250 138 186 162 190 128

"Wallpaper" is the name of a bitmap file
If none is selected, the value is empty in the registry and "(none)" in WIN.INI. (Without quotation marks.)

"TileWallpaper" is a string boolean telling if to tile (1) or center (0)

"Pattern" is eight space-separated byte values (0-255) of the bit mask for the pattern

If you modify the TileWallpaper value, the setting will probably be updated when you call SystemParametersInfo with SPI_SETDESKWALLPAPER.
According to system documentation you can also use SPI_SETDESKPATTERN to modify the Pattern section.

0
 
mikeblasCommented:
Don't modify the registry directly when there are APIs that do what you want.  Instead of changing the registry, use the IActiveDesktop interface.

.B ekiM

0
 
paiAuthor Commented:
Where can I find IActiveDesktop? And where can I find the documentation for that? I use VC++ 4.0, and I can not find it. I intend to use it in Windows 95. Thanks!
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
paiAuthor Commented:
To 2good,

I'm satisfied by your answer. Please answer the question, so I can give you credits.

pai
0
 
mikeblasCommented:
The IActiveDeskotp interface is documented in the Platform SDK, which is included in MSDN. It's also downloadable from http://www.microsoft.com/, and I think it's available online at http://www.microsoft.com/msdn/ in the Preimum Content area.

.B ekiM

0
 
RONSLOWCommented:
What version of Win95 and/or WinNT supports IActiveDesktop?

From its name it sounds like an IE4/Win98 extension...

0
 
paiAuthor Commented:
ya! I have trouble to find out how IActiveDestop works in regular Windows 95. Could mikeblas give us a little bit more explanation?

0
 
tiagoCommented:
Try overriding the Desktop Window WindowProc function
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now