Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fance Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Divers
Thread ID:
00211975
Message ID:
00212947
Vues:
46
>>>Hi,
>>>I know how to use the function in C & VB (using struc and TYPE) but I didn't try to simulate an array of structures in VFP. have you?
>>>How to have an array of POINT structure where:
>>>struct{
>>> LONG x;
>>> LONG y;
>>>} POINT = { {10,10} , {60,50}, {110,10}, {160,50}, {210,10}, {210,110}, {10,110} };
>>>
>>>
>>>
>>Hi Waleed,
>>
>>Concatenate a string with each member of the structure being four bytes long. In other words, in the example above the string would be 56 bytes (4 bytes per member * 2 members * 7 array elements.). What you'll need to do is convert each of the members into a four byte string, in low to high byte order.
>>
>
>George,
>
>This would be great if VFP provided a mechanism to return a pointer to its memory locations, and provided a direct means to freeze a string in place so that VFP's memory management doesn't shift it around during garbage collection. You need to construct the array of POINTS so that it doesn't get moved around by VFP, and so that you can retrieve the location. You can construct the base structure including the array pointer in a VFP string, but the array needs to be in a static memory location; Paul Tatavu's POINTERS or my CLSHEAP can handle this very easily.
>
Hi Ed,

In this case, since the POINT structure doesn't require pointers to its members, the string solution works fine. I've tested this by taking the code in the KB article I mentioned earlier in this thread and translating it to VFP. The code, which produces an equilateral triangle worked fine. It did require two calls (to Polygon() and CreatePolygonRgn()) which used the sturcture.
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