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


Eugene
April 13th, 1999, 08:53 PM
how can I select(hi-light) an item in CListCtrl ? I couldn't find something like "SetSelectItem()" or "SelectItem()". I've tried SetItemState(nLast,LVIS_SELECTED|LVIS_FOCUSED,LVIF_STATUS), but still couldn't work. I want to hi-light the last item after i've deleted 1 item from CListCtrl.

eugene
April 13th, 1999, 08:53 PM
how can I select(hi-light) an item in CListCtrl ? I couldn't find something like "SetSelectItem()" or "SelectItem()". I've tried SetItemState(nLast,LVIS_SELECTED|LVIS_FOCUSED,LVIF_STATUS), but still couldn't work. I want to hi-light the last item after i've deleted 1 item from CListCtrl.

Franky Braem
April 14th, 1999, 01:46 AM
Try this :

SetItemState(nRow, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);