Search code examples
listmfcclistctrl

How do I un-highlight a previously selected line in an MFC CListCtrl programmatically (VS 6)?


Does anyone know how to un-highlight a previously selected line in an MFC CListCtrl programmatically ?


Solution

  • To de-select the 20th item:

    YourListCtrl.SetItemState(20, 0, LVIS_SELECTED);