From: 1993s008 AT educ DOT disi DOT unige DOT it (Alessandro Staltari) Subject: I can't set the desktop wallpaper. 24 Oct 1998 06:47:39 -0700 Message-ID: <00ab01bdfea7$5c14c320$010110ac.cygnus.gnu-win32@archimede> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00A6_01BDFEB8.1EDD5060" To: This is a multi-part message in MIME format. ------=_NextPart_000_00A6_01BDFEB8.1EDD5060 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello! I'm Alessandro Staltari and I have a little big problem with Cygnus = Win32 C/C++ environment(release B19 with patched cygwinb19.dll). I'm tryng to port the nice X-windows program xearth = (http://www.cs.colorado.edu/~tuna/xearth/index.html) to windows, and I = thougth to use the SystemParametersInfo function to update the desktop = wallpaper. The probelm is that when I try to update the wallpaper nothing happen to = the desktop configuration, SystemParametersInfo returns 0 (failure) ad = GetLastError returns 0 (No error). Why? =20 To test the SystemParametersInfo function I used the following simple = program: =20 #include =20 int WINAPI WinMain (HINSTANCE hInstance, =20 HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int cmdShow =20 ) { if (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "c:\\screen.bmp", = SPIF_UPDATEINIFILE)) printf("Success\n"); else printf("Error:%lu\n",GetLastError()); } =20 I compiled it with gcc test.c -luser32 -lgdi32 -o test.exe =20 When I execute ./test.exe at the bash prompt the output is =20 Error:0 I tried to use the same SystemParametersInfo call in a program built = with Visual C++ and it worked properly. I also tried to use SystemParametersInfo to retrieve the size of the = desktop not covered by the system tray (using the SPI_GETWORKAREA = argument) and it woked with Visual C++ and Cygnus both. =20 I hope somebody could help me. =20 Thanks =20 Alessandro Staltari ------=_NextPart_000_00A6_01BDFEB8.1EDD5060 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello!
 
I'm Alessandro Staltari and I have a = little big=20 problem with Cygnus Win32 C/C++ environment(release B19 with patched=20 cygwinb19.dll).
I'm tryng to port the nice X-windows = program=20 xearth (http://www.cs= ..colorado.edu/~tuna/xearth/index.html)=20 to windows, and I thougth to use the SystemParametersInfo function to = update the=20 desktop wallpaper.
The probelm is that when I try to = update the=20 wallpaper nothing happen to the desktop configuration, = SystemParametersInfo=20 returns 0 (failure) ad GetLastError returns 0 (No error). = Why?
 
To test the SystemParametersInfo = function I used=20 the following simple program:
 
#include = <windows.h>
 
int WINAPI WinMain (HINSTANCE = hInstance, =20
    HINSTANCE hPrevInstance,
   =20 LPSTR   lpszCmdLine,
    = int    =20 cmdShow    
   )
{
 if=20 (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, = "c:\\screen.bmp",=20 SPIF_UPDATEINIFILE))
  = printf("Success\n");
 else=20 printf("Error:%lu\n",GetLastError());
}
 
I compiled it with
gcc test.c -luser32 -lgdi32 -o=20 test.exe
 
When I execute ./test.exe at the bash prompt the = output=20 is
 
Error:0
 
I tried to use the same = SystemParametersInfo=20 call in a program built with Visual C++ and it worked = properly.
I also tried = to use=20 SystemParametersInfo to retrieve the size of the desktop not covered by = the=20 system tray (using the SPI_GETWORKAREA argument) and it woked with = Visual C++=20 and Cygnus both.
 
I hope somebody could help = me.
 
Thanks
 
Alessandro = Staltari
------=_NextPart_000_00A6_01BDFEB8.1EDD5060-- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".