Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting wallpaper
Message
De
05/01/2000 07:47:24
 
 
À
05/01/2000 06:35:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00313105
Message ID:
00313116
Vues:
31
>I am trying to give the users the ability to set the wallpaper. Being a bit of a newbie to API programming I've hunted around and come across the SystemParametersInfo function. However, when I use the following code....
>
>
>DECLARE INTEGER SystemParametersInfo IN USER32 uAction AS INTEGER uParam AS INTEGER lpvParam AS STRING fuWinIni AS INTEGER
>

The declaration is wrong, try:
DECLARE INTEGER SystemParametersInfo IN WIN32API ;
   INTEGER uAction, ;
   INTEGER uParam, ;
   STRING @ pvParam, ;
   INTEGER fUpdateProfile
Depending on exactly what is being passed and how you are constructing structures, it might be better to declare pvParam as a string and create the structure in a static location in memory, passing the address of the buffer; this is what I do when using CLSHEAP.

>SystemParametersInfo(20,0,"C:\TEST.BMP",0)
>

pvParam needs to point to the null-terminated string that names the BMP file to use for the wallpaper, so the STRIN @ construct should be used.

>
>...I get a 'Too many arguments' error.
>
>Any clues?
>
>Cheers!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform