title: how to add checkbox control to the listcontrol subitems in mfc
body: <p>I need to add checkbox control to the listcontrol subitems .First I will let you know what I did,Initially i added a listcontrol of report style and added checkbox style to the listview  as follows.</p>
  
  <p>m_MfpListControl.SetExtendedStyle(LVS_EX_CHECKBOXES);</p>
  
  <p>This step of code is adding checkboxes to the first most column.But,I want to add checkbox to the  subitems randomly like as,</p>
  
  <p>Column1 | Column2 | Column3 | COlumn4</p>
  
  <hr>
  
  <p>[]Item1 | []subitem1 | []subitem2 | [] subitem3</p>
  
  <p>[]-Represents Checkbox</p>
  
  <p>Adding for the "Item1" is not a big deal but adding to the subitems making me down and moreover I tried in manny ways like as after inserting item ,I am setting the state for the particular item as,</p>
  
  <p>m_MfpListControl.SetItemState(0,INDEXTOSTATEIMAGEMASK(3),LVIS_STATEIMAGEMASK);</p>
  
  <p>But this also didn't work fine ,as I am able to add and remove the checkbox for the first column ,I tried in a way of applying the same methodology like setting the item state as I had done using "SetItemState()" API in order to add the checkbox control to the subitems ,unfortunately it is not working in case of subitems.</p>
  
  <p>Can anyone please let me know the right approach so that I should be able to add checkboxes to the subitems.</p>