Change desktop background image programmatically with C++

VansFannel 0 Reputation points


I'm developing a Windows 10 and Windows 11 application with C++.

I want to know if there is a way to change the desktop wallpaper programmatically. How can I do it? Is there a Windows API call to do it? Maybe, I only have to override an image file.

With desktop wallpaper I mean the image that we see as background of our desktop, not the one we see when the computer is locked


Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,604 questions
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,740 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,147 questions
0 comments No comments
{count} votes