#include <iostream> #include <Windows.h> int main() { const char* path = "C:\Users\ajanuw\Pictures\Saved Pictures\1.jpg"; SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, (PVOID)path, SPIF_SENDCHANGE); return 0; }
See also: