使用SystemParametersInfoA接口來更換windows的壁紙,雖然挺好用,但是我想寫一個顯示GIF壁紙的程序,想法是將GIF的每一個幀連續切換顯示,奈何該接口設置壁紙的時間太長,達不到快速切換的效果。
該接口的用法:
#include <windows.h> #include <iostream> #include <string> #include <sstream> ------------------------------------ stringstream imgPath; imgPath<<"path\\img.jpg"; SystemParameteersInfoA(SPI_SETDESKWALLPAPER, 0, (PVOID)imgPath.str().c_str(), SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
