# VC++ List Control with Checkboxes



## haritadala (Jul 4, 2003)

Hello all

I created an mfc application which uses List Control. I want to use checkboxes in this List, I set the property like

listctrl.SetExtendedStyle(LVS_EX_CHECKBOXES);

Now I'm able to list checkboxes in list control. But the problem is when I'm clicking on checkbox the entire row is not being highlighted. I used LVS_EX_FULLROWSELECT flag but of no use.
I'm using LIST view style for this list control.

How to code so that the checkbox is checked/unchecked if I click on checkbox as well as the label associated with checkbox. Similarly background should be highlighted if the checkbox state is checked. It seems in this case both checkbox and label are acting independent of each other.

Pls help me with an example , Thanks in advance.


----------

