Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Failed DLL Call
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00761081
Message ID:
00763226
Vues:
18
Thank you very much for the explanation and the help!

>The RECT structure is a combination of four 4-byte numeric values.
typedef struct _RECT {
>LONG left;
>LONG top;
>LONG right;
>LONG bottom;
>} RECT, *PRECT;
>You can not pass this structure to an API function using a VFP array, since the array element occupies more than four bytes. Use STRING instead.
>
>For example, a numeric value 43981 can be converted into in 4-byte LONG value as
>Chr(13) + Chr(12) + Chr(11) + Chr(10)
>Why? Because 43981 in hex notation is presented as 0xABCD. This is it. You just assemble four bytes -- from LOwest to HIghest:
>0xd = 13
>0xc = 12
>0xb = 11
>0xa = 10
>So if you need to assemble the RECT structure with (10,0,100,100) do this:
>cRECT = Chr(10) + Chr(0) + Chr(0) + Chr(0) +;
>   Chr(0) + Chr(0) + Chr(0) + Chr(0) +;
>   Chr(100) + Chr(0) + Chr(0) + Chr(0) +;
>   Chr(100) + Chr(0) + Chr(0) + Chr(0)
>And such input parameter must be declared as STRING or STRING @. So your declaration should look like the following:
>DECLARE INTEGER IS3DrawSmoothTextOnRGB IN ISource30
>	INTEGER @ pRGB,;
>	LONG      uWidth,;
>	LONG      uHeight,;
>	LONG      uRowStride,;
>	STRING  @ pText,;
>	STRING  @ pFontName,;
>	LONG      uFontHeight,;
>	LONG      uSmoothingFactor,;
>	STRING  @ pTextRect,;
>	LONG      uDrawFlags,;
>	LONG      uFlags,;
>	INTEGER   textColor
>All parameters passed by reference must be allocated before calling external function.
>
>Here is a sample FoxPro code: Clipping mouse cursor area
>http://www.news2news.com/vfp/?example=80
>
>Notice that the ClipCursor accepts RECT structure as an input parameter and the GetClipCursor function returns data in a RECT structure.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform