Set checkbox with API for Listview ctrl 
Author Message
 Set checkbox with API for Listview ctrl

I am looking for the correct message to send that will allow me to
check a check box in a listview control.  The items in my listview are
sorted using the LVM_SORTITEMS message so the index returned by the
Item_click or Item_check events does not match the clicked/checked
item.  I have successfully been able to use the LVM_GETITEMTEXT message
to retrieve the proper text for the item, but I have been unable to
programmatically check the proper item.  Any ideas appreciated.

Also, where is a good place to find the values for all the windows
message constants?  I've only been able to find them in other peoples
code and I would like a list of them if possible. ex. LVM_FIRST = &H1000
and LVM_SETIMAGELIST = (LVM_FIRST + 3)

Thanks!
Andy

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 15 Jun 2002 03:00:00 GMT  
 Set checkbox with API for Listview ctrl
Andy,

Quote:
>I am looking for the correct message to send that will allow me to
>check a check box in a listview control.  

IIRC, that would be LVM_SETITEMSTATE. Set LVITEM.stateMask to
LVIS_STATEIMAGEMASK and LVITEM.state to IIf(ItemIsChecked, &H2000&,
&H1000&)

Quote:
>Also, where is a good place to find the values for all the windows
>message constants?  I've only been able to find them in other peoples
>code and I would like a list of them if possible. ex. LVM_FIRST = &H1000
>and LVM_SETIMAGELIST = (LVM_FIRST + 3)

Download the LVDefs module from http://www.mvps.org/btmtz/listview/

Happy Y2K!   Mattias

________________________________________________
Mattias "beezo" Sj?gren, MCP

http://home1.2.sbbs.se/mattias.sjogren/sw/
Please send questions/replies to the newsgroups



Sat, 15 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HOWTO: inserting items in a ListView ctrl with APIs

2. HOWTO: inserting items in a ListView ctrl with APIs

3. Programmatically set checkboxes in ListView???

4. How Set CheckBox value with API

5. ListView Set ColumnWidth API

6. HOW CAN I DISABLE CTRL+X, CTRL+V,CTRL+C

7. HOW CAN I DISABLE Ctrl+C,Ctrl+V,Ctrl+X

8. Sorting ListView Ctrl By Date In Subfield

9. Ctrl+ to a Listview

10. How to register the ListView,MenuBar ctrls on PPC

11. Good listview CTRL documentation?

12. Checkboxes in the Listview-control

 

 
Powered by phpBB® Forum Software