SFML community forums

Help => Graphics => Topic started by: barnack on May 12, 2019, 12:39:34 am

Title: (Windows-specific) render on wallpaper?
Post by: barnack on May 12, 2019, 12:39:34 am
Does anyone know how to (if it's even possible) get the handle (if it even has one) of Windows's wallpaper and use it as SFML graphics rendering surface? I've successfully done something similar with the taskbar, but i can't find out how the wallpaper works. The taskbar seems to act like a borderless fixed window with an on top priority, or at least i could retrive the handle to draw on as if it was a window. But i've no idea how the desktop works...
Title: Re: (Windows-specific) render on wallpaper?
Post by: Laurent on May 12, 2019, 09:50:32 am
This question is not related to SFML, you should probably ask it on a forum with more low-level Windows experts.
Title: Re: (Windows-specific) render on wallpaper?
Post by: Hapax on May 12, 2019, 05:35:57 pm
I'm surprised you couldn't find something to help you. This seems to be what you are looking for:
https://stackoverflow.com/questions/1669111/how-do-i-get-the-window-handle-of-the-desktop
Title: Re: (Windows-specific) render on wallpaper?
Post by: barnack on May 13, 2019, 06:35:34 pm
Well i'm surprised Microsoft made it difficult to do.
Got the solution here: https://stackoverflow.com/questions/56101925/windows-types-wont-let-my-callback-access-local-variables-any-workaround/56102000?noredirect=1#comment98842217_56102000 (https://stackoverflow.com/questions/56101925/windows-types-wont-let-my-callback-access-local-variables-any-workaround/56102000?noredirect=1#comment98842217_56102000)
trying to get the C# solution from the following link in C++ https://www.codeproject.com/Articles/856020/Draw-Behind-Desktop-Icons-in-Windows-plus (https://www.codeproject.com/Articles/856020/Draw-Behind-Desktop-Icons-in-Windows-plus)