Reputation: 283
How can I change background-image of desktop with C++ on Windows?
Or Is there any command for this process to using at cmd?
Upvotes: 1
Views: 3386
Reputation: 8587
You can change the background image of the desktop with SystemParametersInfo()
.
#include "stdafx.h"
#include <windows.h>
int main() {
int return_value = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, L"d:/flower1.jpg", SPIF_UPDATEINIFILE);
return 0;
}
Upvotes: 3