c++ 设置桌面壁纸(win)

#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:

posted @ 2021-01-02 20:18  Ajanuw  阅读(1999)  评论(0编辑  收藏  举报