找了半天支找到这个,可以改变wallpaper的选项
typedef struct _tagWALLPAPEROPT {
DWORD dwSize;
DWORD dwStyle;
} WALLPAPEROPT;Members
dwSize
Unsigned long integer value that contains the size of the WALLPAPEROPT structure.
dwStyle
Unsigned long integer value that contains the wallpaper style. Can be one of the following values: WPSTYLE_CENTER
WPSTYLE_TILE
WPSTYLE_STRETCH
WPSTYLE_MAX
typedef struct _tagWALLPAPEROPT {
DWORD dwSize;
DWORD dwStyle;
} WALLPAPEROPT;Members
dwSize
Unsigned long integer value that contains the size of the WALLPAPEROPT structure.
dwStyle
Unsigned long integer value that contains the wallpaper style. Can be one of the following values: WPSTYLE_CENTER
WPSTYLE_TILE
WPSTYLE_STRETCH
WPSTYLE_MAX
{
LPCTSTR pszStr = (LPCTSTR) strFileName;
SystemParametersInfo(SPI_SETDESKWALLPAPER,NULL,(LPVOID)pszStr,NULL);
}
b = 0 //说明没错! 晕倒!
0,
"yourpath\\yourfilename",
SPIF_SENDCHANGE|SPIF_UPDATEINIFILE);
:)
还好,我没遇到。