I am trying to use the FindItem function to determine which item is currently selected but it seems to return -1 (error) no matter what information I enter. e.g.
lvf.flags = LVFI_PARAM;
lvf.lParam = LVIS_SELECTED;
CListCtrl& theCtrl = GetListCtrl();
nFound = theCtrl.FindItem(&lvf,-1);
I've tried all the other lParam options to no avail. Anybody know the answer?