Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a wallpaper

Status
Not open for further replies.

Ruggie

Programmer
Aug 2, 2003
46
0
0
US
I'm attempting to set a JPG desktop wallpaper via the IActiveDesktop interface but every time I include shlobj.h I get a bunch of "Multiple declaration" errors and the interface is not available without it.

Anyone have suggestions on another way to do this?

I know you can set bmp images via the registry but I'm trying to use a jpg image via active desktop.
I know the active desktop information is kept in the desktop.htt file which is recreated by windows when the active desktop information is changed. I don't want to just scan and edit the file manually becuase the results don't show up right away on the desktop and when I was playing with it sometimes windows would rewrite the file and undo what I did.

-Ruggie
 
Sounds like you need to declare the correct namespace for whatever you are using. For example, if you needed to use something in the standard namepace, use "std::" before the call.



James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
I understand what your saying but the main problem I was having was not being able to include shlobj.h so I could use the interface IActiveDesktop. The MSDN says IActiveDesktop requires shlobj.h

Unless your suggesting another method? If so please explain a bit more.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top