I am working on a program that uses as LISTVIEW with 2 columns. The first column has a CHECKBOX, it defaults to not being checked. How to I force it to be Checked.
Any help will be appreciated.
Thanks,
Bill
These are the 2 routines I used.Sub SetCheckState(win:Window,cid:Int,index:Int,ticked:Int)
Def litem:LVITEM
litem.mask=LVIF_STATE
If ticked Then ticked = 0x2000 Else ticked = 0x1000
litem.state=ticked
litem.stateMask=LVIS_STATEIMAGEMASK
SendMessage(win,LVM_SETITEMSTATE,index,litem,cid)
Return
EndSub
Sub GetCheckState(win:Window,cid:Int,index:Int),Int
int n
'State image 1 is the unchecked box, and state image 2 is the checked box.
'Setting the state image To zero removes the check box altogether.
n=(SendMessage(win,LVM_GETITEMSTATE,index,LVIS_STATEIMAGEMASK,cid))/4096
Return (n=2)
EndSub
You've already got a version of the GetCheckState
Larry
Thank you, Larry. That looks like it is exactly what I am looking for.
Bill