Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Evaluating boolean statements

Status
Not open for further replies.

TerraSamba

Programmer
Aug 19, 2002
57
NL
I want to create a toolbar with my application with numerous button combinations. I want to have the combination ability that the messagebox has.

Like: VbOkOnly + vbDefaultButton2 + vbExclamation

(In my case: tbStyle= btnNew + btnPaste + btnCopy + etc)

But I have no idea how these boolean values work in combination with an enum statement. How do you eveluate the results and which values do you give the options in the enum list?

Any tips would be appreciated, Thanx
 
TerraSamba,

Create your enumeration based in powers of 2:

Enum
btnNew=1
btnPaste=2
btnCopy=4
...
EndEnum

Hope this help you
Carlos Paiva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top