This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
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?
To test the SystemParametersInfo function I used
the following simple program:
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int cmdShow ) { if (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "c:\\screen.bmp", SPIF_UPDATEINIFILE)) printf("Success\n"); else printf("Error:%lu\n",GetLastError()); } I compiled it with
gcc test.c -luser32 -lgdi32 -o
test.exe
When I execute ./test.exe at the bash prompt the output
is
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.
I hope somebody could help me.
Thanks
Alessandro Staltari
|
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |