Rohit
Rohit

Reputation: 1

setting an HBITMAP object as desktop wallpaper

How do you set an HBITMAP object as the wallpaper? I am taking the screenshot of the desktop using BitBlt, so i have the screenshot as a HBITMAP object. Now i can save the object to a bmp file and the set it as wallpaper using SystemParametersInfo, SPI_SETDESKWALLPAPER.

But i am checking if there is a direct way to set the bitmap object as a wallpaper. Any API or something?

Upvotes: 0

Views: 251

Answers (1)

Anders
Anders

Reputation: 101616

It needs to be an actual file (Think about reboots etc)

If you are trying to mimic UAC, this is not the way to do it. If you want to mimic UAC, just create a window the size of the screen and draw the bitmap there (To mimic the actual security feature, you should put this window and your "UAC dialog" on a separate desktop that does not allow hooks, the CreateDesktop() API should get you started)

Upvotes: 1

Related Questions