Click to See Complete Forum and Search --> : How to select an item in CListCtrl?


October 18th, 1999, 02:20 AM
Hi all,

Can someone tell me how to select or highlight an item in a CListCtrl in run time? I want to make sure at least one item is highlighted at any time.

Wilson

Thomas Ascher
October 18th, 1999, 02:27 AM
Hi, use SetItemState:

pList->SetItemState(nItemIndex, LVIS_SELECTED, LVIS_SELECTED);

October 18th, 1999, 07:50 PM
Thanks.

Wilson