|
-
Jan 23rd, 2002, 08:09 AM
#1
Change wallpeper in vc++ (Newbie)
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 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 that says exactly the sane thing apart from I need to include Coredll.lib??? any idears?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|