Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DrawText format problems
Message
De
23/03/2005 10:09:19
 
 
À
22/03/2005 17:11:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
00998177
Message ID:
00998414
Vues:
22
Hello,

you cannot use the constants at runtime since they only have a meaning at compilation time.

I would use one of these approaches:

1. store the parameter value in numerical form (field type int) directly into the table (saves table space and performance is the best you can get)
the only disadvantage is that you have to manually do some math to fill the table

2. store the parameter value in a 3 byte long character field with abbreviations for the possible alignment settings
e.g. C = Center, R = right, B = break, (Left is default)
CR = center+break
then write a simple udf

FUNCTION EncodeTextAlignment(lcAlign)
LOCAL lnAlign
lnAlign = 0
IF "C" $ lcAlign
lnAlign = TEXT_CENTER
ENDIF
IF "R" $ lcAlign
lnAlign = lnAlign + TEXT_RIGHT
ENDIF
IF "B" $ lcAlign
lnAlign = lnAlign + TEXT_BREAK
ENDIF
RETURN lnAlign
ENDFUNC

and call your UDF instead of EVAL, VAL ..


Regards
Christian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform