Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clicking a QmGrid checkbox
#4
I tried to make a LvSetItemText based on LvGetItemText

Function LvGetItemText
Code:
Copy      Help
;/
function! hlv item subitem str&s

;Gets listview control item text.
;Returns 1 if not empty, 0 if empty.

;hlv - handle.
;item - 0-based row index.
;subitem - 0-based column index.
;s - receives text.


LVITEMW li
BSTR b.alloc(260)
li.pszText=b
li.cchTextMax=260
li.iSubItem=subitem

SendMessage(hlv LVM_GETITEMTEXTW item &li)
s.ansi(b)
ret s.len!=0

I edited it like this....


Function LvSetItemText
Code:
Copy      Help
;/
function! hlv item subitem str&s

;Gets listview control item text.
;Returns 1 if not empty, 0 if empty.

;hlv - handle.
;item - 0-based row index.
;subitem - 0-based column index.
;s - supplies text.


LVITEMW li
BSTR b.alloc(260)
li.pszText=s
li.iSubItem=subitem
SendMessage(hlv LVM_SETITEMTEXTW item &li)
ret


with the calling statement

Function AttendingCommentsDlg_Trainee
Code:
Copy      Help
,,str CheckBoxYes="Yes"
,,int CheckBoxSubItem=0
,,LvSetItemText hlv RowNumber CheckBoxSubItem CheckBoxYes

but it still doesn't work.

Any help would be much appreciated. I think I am getting close!!
Stuart


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)