WORK IN PROGRESSYou can now create a fourth type of button: CHECKBOX
zCheckButton ( _
BYVAL
hOwner AS LONG, _ ' The Parent handle
zFullpathImageName AS ASCIIZ, _ ' Full path name to the image 2-state button
zLabel AS ASCIIZ, _ ' The button's label
BYVAL
x AS LONG, _ ' The control X location
BYVAL
y AS LONG, _ ' The control Y location
BYVAL
xW AS LONG, _ ' The control width
BYVAL
yH AS LONG, _ ' The control height
BYVAL
ButID AS LONG, _ ' The control unique identifier
BYVAL
ARGBColor AS LONG _ ' The ARGB color to use with the text label
)
Note: there are a few minor changes to the source code to handle CheckBox and a few new functions:
'// Get check button statusFUNCTION zGetCheckButtonStatus(BYVAL hBut AS LONG) AS LONG
IF SendMessage(hBut, %BM_GETCHECK, 0, 0) = %BST_CHECKED THEN
FUNCTION = -1
END IF
END FUNCTION
'// Set check button statusSUB zSetCheckButtonStatus(BYVAL hBut AS LONG, BYVAL TrueFalse AS LONG)
LOCAL UseState AS LONG
IF TrueFalse THEN UseState = %BST_CHECKED ELSE UseState = %BST_UNCHECKED
CALL SendMessage(hBut, %BM_SETCHECK, UseState, 0)
END SUB
EXTRA BONUS:
SKIN AEROAnd here is the result :