Yes. CheckBoxes are just a modified button -- even in C and Visual Basic.
They are just a different graphical style, that's all. Use any window spy app
to view the class of checkboxes in other apps if you don't believe me.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
PB wrote:
They are just a different graphical style, that's all. Use any window spy app to view the class of checkboxes in other apps if you don't believe me.
I believe you
Is there another way to know what gadget type is hiding behind a handle ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
> is there a more precise way to identify a gadget than its class (e.g. CheckBox <> Button)?
I see what you mean now... but I don't think so. You'd have to just scan for
the basic class (like my proc above) and then, for example, test to see if the
button is really a button or checkbox, by checking its flags. I don't know too
much about testing all flag possibilities, so I won't go into it.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
I didn't think so either.
I just modified my PureCOLOR lib with a specific function for buttons, because I didn't find a simple and reliable way to distinguish real buttons from other 'button' class members.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
If (Style&#BS_GROUPBOX=#BS_GROUPBOX)
Type=#SkinGroupBox
ElseIf (Style&#BS_CHECKBOX=#BS_CHECKBOX Or Style&#BS_AUTOCHECKBOX=#BS_AUTOCHECKBOX Or Style&#BS_3STATE=#BS_3STATE Or Style&#BS_AUTO3STATE=#BS_AUTO3STATE)
If Style&#BS_PUSHLIKE=#BS_PUSHLIKE
Type=#SkinButton
Else
Type=#SkinCheckbox
EndIf
ElseIf (Style&#BS_RADIOBUTTON=#BS_RADIOBUTTON Or Style&#BS_AUTORADIOBUTTON=#BS_AUTORADIOBUTTON)
Type=#SkinRadio
ElseIf (Style&#BS_PUSHBUTTON=#BS_PUSHBUTTON Or Style&#BS_DEFPUSHBUTTON=#BS_DEFPUSHBUTTON)
Type=#SkinButton
EndIf