Author Topic: [SDK] 10- Take control of your CHECKBOX BUTTON  (Read 5087 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2022
    • www.zapsolution.com
[SDK] 10- Take control of your CHECKBOX BUTTON
« on: August 15, 2007, 10:34:41 PM »
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
Code: [Select]
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
Code: [Select]
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
« Last Edit: August 10, 2011, 04:58:44 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Kent Sarikaya

  • Full Member
  • ***
  • Posts: 201
Re: [SDK] 10- Take control of your CHECKBOX BUTTON
« Reply #1 on: August 16, 2007, 03:27:22 AM »
Just when I think it can't get any better you manage to come up with another neat addition. Thanks.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2022
    • www.zapsolution.com
Re: [SDK] 10- Take control of your CHECKBOX BUTTON
« Reply #2 on: August 10, 2011, 04:59:24 PM »
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