I have a quick question:

Does anyone know how to disable user selection of check boxes in a Listview set with the property "LVS_EX_CHECKBOXES" in a Report view.

I have a list generated by my program, with check boxes indicating weather or not work will be done on this entry. I dont want the user to be able to uncheck or check this list...

Thanks!
:NaN:
Posted on 2003-08-16 15:14:17 by NaN
Why not set the icon for the listview items to a bitmap of a check or uncheck (disabled) and not use the LVS_EX_CHECKBOXES style at all. You can then have the "check boxes" shown and not selectable. Just need two items in the imagelist.
Posted on 2003-08-16 15:38:24 by donkey
Err ya, but this is a ListView... I find it painful to do anything like this.. Is is trivial to do??

:NaN:
Posted on 2003-08-16 16:02:53 by NaN
It's actually very easy, here is a RadASM project that demonstrates it. I had no checkmark icons so I used folder open/close instead.

PS: It's pretty rough...

Sorry forgot the mask...
Posted on 2003-08-16 18:07:35 by donkey
See this (pretty old) thread: http://www.asmcommunity.net/board/index.php?topic=2301

Thomas
Posted on 2003-08-16 18:21:00 by Thomas
Thanks Donkey for the source! This is more than expected... I see now what you mean with the images, however, Thomas' link is the more applicable solution to what i have designed for.

Your help has not gone unnoticed tho, i think i might use this in another project that is more applicable ;)

Thanks again both of you!
:alright:
NaN
Posted on 2003-08-16 21:29:31 by NaN