Difference between revisions of "Checkboxes"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
m
Line 40: Line 40:
 
Here you can download a sample:
 
Here you can download a sample:
 
*[http://samples.tdcommunity.net/index.php?dir=&file=WIKI_CheckboxTextAtLeft.zip WIKI_CheckboxTextAtLeft.zip]<br>
 
*[http://samples.tdcommunity.net/index.php?dir=&file=WIKI_CheckboxTextAtLeft.zip WIKI_CheckboxTextAtLeft.zip]<br>
 +
 +
 +
{{Download
 +
|URL=http://samples.tdcommunity.net/index.php?dir=&file=WIKI_CheckboxTextAtLeft.zip
 +
|TEXT=WIKI_CheckboxTextAtLeft.zip
 +
}}
 
<br>
 
<br>

Revision as of 08:32, 12 July 2013

This page covers Checkbox tips & tricks.

Contents


Pointer2.png How to set value using only the window handle of a checkbox Pointer.png

First you have to declare this constant

Number: BM_SETCHECK   = 0x00F1


The next piece of code checks the checkbox

Call SalSendMsg( hWndItem, BM_SETCHECK, TRUE, 0 )

UnChecking

Call SalSendMsg( hWndItem, BM_SETCHECK, FALSE, 0 )


Pointer2.png How to set the checkbox text at the left Pointer.png

This also works for radiobuttons.
First you have to declare this constant

Number: BS_LEFTTEXT    = 0x00000020


The next piece of code sets the checkbox/radiobutton text at the left

Call VisWinSetStyle( hWndItem, BS_LEFTTEXT, TRUE )


CheckBoxTextLeft.png

Here you can download a sample:


Down.png WIKI_CheckboxTextAtLeft.zip