views:

645

answers:

1

Hello, I'm trying to trigger a desktop slideshow change but I can't find a public API to do it...

The closer I got was to see the name of the methods that are using (they are using a COM object, but I don't know the CLSID to instantiate it).

I already know how to change the desktop wallpaper (i'm doing that already), what I want is a way to trigger the slideshow transition (new to Windows 7).

+1  A: 

This doesn't answer your question, and you may have worked it out already, but if the desktop slideshow engine (as I'll call it) has been started (if you bring up 'Personalize' > 'Desktop Background' then choose 'Windows Desktop Backgrounds' from the 'Picture location' drop down, then you'll see the background fade in and out - that's the engine on) then you can use the IActiveDesktop interface by calling 'SetWallpaper' with your JPEG picture and then 'ApplyChanges' with the following parameters:

AD_APPLY_ALL | AD_APPLY_FORCE | AD_APPLY_BUFFERED_REFRESH

When you do you'll notice the slideshow transition effect is used to show the wallpaper you've specified. Lovely.

Reboot however (or kill off Explorer.exe and re-start it) and the same call won't do the transition, it'll just change the background in the old, instant way. Some digging with Spy++ shows that when the slideshow engine is running, the actual desktop FolderView no longer lives under 'Program Manager' in the window parent / child relationship, it's owned by a new window called 'WorkerW' which lives inside Explorer (ties up nicely with your call stack above). In other words, it's taking control of the desktop window from Progman.

So what you need to do is figure out how to get Explorer to initialise that new owner of the desktop window (the 'slideshow engine') and then you can use the IActiveDesktop interface to change the background.

John Conners
Hey, thanks for the info, at least I have somewhere closer to look at...whenever (if) I get more info on this I'll post it.
Pablo Montilla