o0Jon0o
Jan 23rd, 2002, 07:09 AM
I'm really new to win32 programming, and for one of my first projects I thought I would make a program to randomly changes the desktop wallpaper.
I found this function: SystemParametersInfo()
and tried to use it in a console app with MFC support like this:
int ver1;
ver1 = SystemParametersInfo(SPI_SETDESKWALLPAPER ,0,"c:/10.bmp",SPIF_SENDCHANGE);
cout << ver1 << "\n";
Strangely but not surprisingly it returned 0 and the wallpaper didn't change. I have tried including winuser.h and windows.h to no avail.
The
guide that I was following (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_4p67.asp) said I needed to include User32.lib so my question is:
how do I include User32.lib and if I do will my program work?
Thanks for you time
Jon
P.S I've just found another msdn guide (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/htm/cerefSystemParametersInfo.asp) that says exactly the sane thing apart from I need to include Coredll.lib??? any idears?
I found this function: SystemParametersInfo()
and tried to use it in a console app with MFC support like this:
int ver1;
ver1 = SystemParametersInfo(SPI_SETDESKWALLPAPER ,0,"c:/10.bmp",SPIF_SENDCHANGE);
cout << ver1 << "\n";
Strangely but not surprisingly it returned 0 and the wallpaper didn't change. I have tried including winuser.h and windows.h to no avail.
The
guide that I was following (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_4p67.asp) said I needed to include User32.lib so my question is:
how do I include User32.lib and if I do will my program work?
Thanks for you time
Jon
P.S I've just found another msdn guide (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/htm/cerefSystemParametersInfo.asp) that says exactly the sane thing apart from I need to include Coredll.lib??? any idears?