Solved

Wallpaper

Posted on 1997-12-02
8
1,012 Views
Last Modified: 2013-12-03
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
Comment
Question by:pai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 1

Expert Comment

by:2good
ID: 1409065
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
 
LVL 11

Expert Comment

by:mikeblas
ID: 1409066
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
 

Author Comment

by:pai
ID: 1409067
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:pai
ID: 1409068
To 2good,

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

pai
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 1409069
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
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1409070
What version of Win95 and/or WinNT supports IActiveDesktop?

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

0
 

Author Comment

by:pai
ID: 1409071
ya! I have trouble to find out how IActiveDestop works in regular Windows 95. Could mikeblas give us a little bit more explanation?

0
 
LVL 1

Expert Comment

by:tiago
ID: 1409072
Try overriding the Desktop Window WindowProc function
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Winform not working on 64 bit machine 31 105
Excel Use VBA to get user's Mac Address for their computer 5 399
Windows Process running 3 65
VS2015 Redefinition errors 4 100
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question