Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants using hex
Message
De
20/03/2008 08:37:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01303578
Message ID:
01303814
Vues:
15
>>No. That wouldn't be my idea of fun. I simply started wtih the PowerBasic version of an include file that had those constants defined as noted in my original message. This file was included with RMChart's samples.
>>
>>I'm assuming that PowerBasic (in combination with RMChart) somehow handled those definitions correctly and VFP cannot without removing the leading FFs.
>
>0xFFF0F8FF is an integer with decimal value of -984833 but VFP interprets it as 4293982463. As I showed in one of the previous messages, BITAND(0xFFF0F8FF, 0xFFFFFFFF) takes care of that problem by correctly casting the value to the integer.


Mike,

Please check the results using Sergey's and the other simplified solution.
See if the resulting colors are exactly the same.

It seems that the correct approach AS ALWAYS comes from Sergey.

I've just learned a good one too !

You can get some VFP converted color constants directly from Craig Boyd's blog
http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,2d3a877d-3502-4650-bff3-c06c736dc177.aspx
or in the file GdiPlusX.h that comes with the GdiPlusX sources library
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform