Solved

Wallpaper

Posted on 1997-12-02
8
1,004 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
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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

912 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now