views:

31

answers:

1

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?

Thanks, Rohit

+1  A: 

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)

Anders