Answers for "change wallpaper using c"

0

change wallpaper using c

#include <windows.h>
#include <iostream>


int main() {
    const wchar_t *path = L"C:\\image.png";
    int result;
    result = SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, (void *)path, SPIF_UPDATEINIFILE);
    std::cout << result;        
    return 0;
}
Posted by: Guest on April-04-2021

Browse Popular Code Answers by Language