How to change desktop background using VC++

前端 未结 2 1746
南笙
南笙 2021-01-16 07:11

I am currently trying to change my desktop background using SystemParametersInfo() vs doesnt give me any errors when I type my stuff in but when I run the program I get this

2条回答
  •  耶瑟儿~
    2021-01-16 07:54

    A better description of the error would definitely help more. For starters though, you should replace all of the forward slashes with double black slashes "\\".

    SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "C:\\Windows\\Downloaded Program Files\\Flowers.jpg", SPIF_UPDATEINIFILE);

    That looks right, however there's no telling what the actual cause of the error is without a little more information. Also a PDB file does not affect a program, that's for debugging a file.

提交回复
热议问题