• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

[SDK] 10- Take control of your CHECKBOX BUTTON

Started by Patrice Terrier, August 15, 2007, 10:34:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

WORK IN PROGRESS

You 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 status
FUNCTION 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 status
SUB 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 AERO

And here is the result :



Patrice Terrier
www.zapsolution.com
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Kent Sarikaya

Just when I think it can't get any better you manage to come up with another neat addition. Thanks.

Patrice Terrier

The first post of this thread has been updated, to fix the ZIP file corruption caused by the "Server Collapse".

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com