Difference between revisions of "Checkboxes"
From Team Developer SqlWindows Wiki
DaveRabelink (Talk | contribs) m (CheckBox left text sample added) |
DaveRabelink (Talk | contribs) |
||
Line 24: | Line 24: | ||
<!------------------------------------------------------------------------------------------------------------------------------> | <!------------------------------------------------------------------------------------------------------------------------------> | ||
{{TipHeader|How to set the checkbox text at the left}} | {{TipHeader|How to set the checkbox text at the left}} | ||
+ | This also works for radiobuttons.<br> | ||
First you have to declare this constant<br> | First you have to declare this constant<br> | ||
<pre> | <pre> | ||
Line 29: | Line 30: | ||
</pre> | </pre> | ||
<br> | <br> | ||
− | The next piece of code sets the checkbox text at the left | + | The next piece of code sets the checkbox/radiobutton text at the left |
<pre> | <pre> | ||
Call VisWinSetStyle( hWndItem, BS_LEFTTEXT, TRUE ) | Call VisWinSetStyle( hWndItem, BS_LEFTTEXT, TRUE ) |
Revision as of 01:12, 1 December 2012
This page covers Checkbox tips & tricks.
Contents |
How to set value using only the window handle of a checkbox 
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 )
How to set the checkbox text at the left 
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 )
Here you can download a sample: