Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MESSAGEBOX
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00365597
Message ID:
00365706
Vues:
16
>>Naw, not really Bruce. Consider that the button type is in the 3 least significant bits, the icon is defined in bits 4-7 (this is zero based BTW), and the default button in 7 and 8. Thus:
lnbutton = BITAND(308, 7) && 4
>>lnicon = BITAND(308, 240) && 48
>>lnbutton = BITAND(308, 768) && 256
>
>So, what's difficult about that? :) For human logic, it's simple enough, at least. If it's in (100,500) it's default 2, > 500 it's default 3, and you subtract 256 or 512. And so on...
>
>I have more trouble remembering the return values, frankly, those are what I use the hardcopy on my wall for mostly.

Actually, I was pointing out the method Windows uses to store and decipher the value(s) passed. The values I used above will retrieve any of the values used when they've been added together. Since we're on the subject of #DEFINEs
#DEFINE BUTTON_VALUES 7
#DEFINE ICON_VALUES 240
#DEFINE DEFAULT_BUTTON_VALUES 786
#DEFINE MODALITY_VALUES 12288
* lnvalue is some combination of MessageBox() flags
lnbutton = BITAND(lnvalue, BUTTON_VALUES)
lnicon = BITAND(lnvalue, ICON_VALUES)
lndefault = BITAND(lnvalue, DEFAULT_BUTTON_VALUES)
lnmodality = BITAND(lnvalue, MODALITY_VALUES)
Not much to it.
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