現在 C++ を学習中で、デスクトップの壁紙を変更したいと考えています。ただし、上記のエラーが発生しています。
#include <string>
#include <iostream>
#include <Windows.h>
using namespace std;
int main() {
LPWSTR test = L"C:\\Users\\user\\Pictures\\minion.png";
int result = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0,
test, SPIF_UPDATEINIFILE);
}
タイプ "Const wchar_t*" の値を使用して、タイプ LPWSTR のエンティティを初期化することはできません
何か案は?
ありがとう