Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fance Form
Message
 
À
23/08/1999 11:32:20
J Chris Powell
Myers and Stauffer Lc
Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Divers
Thread ID:
00211975
Message ID:
00256665
Vues:
45
>Could I have a copy of the translated code from the KB CreatePolygonRgn() article. I've attempted to translate it a and keep getting a 'too many arguments' on the Polygon() function. tia

Hi Chris,

Rather than do the whole thing for you, let me try to give you a hand trying to figure out the problem. It's sound like you've either declared too many and/or trying to pass too many parameters. Here's the declaration and how to create the POINT structure using a string.
DECLARE INTEGER Polygon IN Win32API;
  INTEGER hdc, STRING @lpPoints, INTEGER nCount
lcpoint = ""
* Translated from the KB article create the equivalent of a POINT
* structure array of three elements
lcpoint = IntegerToString(ThisForm.width / 2)
lcpoint = lcpoint + IntegerToString(ThisForm.height / 2)
lcpoint = lcpoint + IntegerToString(ThisForm.width / 4)
lcpoint = lcpoint + IntegerToString(3 * ThisForm.height / 4)
lcpoint = lcpoint + IntegerToString(3 * ThisForm.width / 4)
lcpoint = lcpoint + IntegerToString(3 * ThisForm.height / 4)
* Call the function
llresult = Polygon(lnhDC, @lcpoint, 3)
The reference to the IntegerToString function above is used to convert the values to the appropriate character string. You can find a copy of it in my recent FAQ documenting a workaround for problems with SYS(2020) and DISKSPACE() functions. It's also (as a class) available in my Obj2Bmp file available for download here.

Does this help?
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform