This is happening on a property page. The user selects an item on the list control, and other controls on the page fill with attributes associated with the selected item. They can then press a button on the property page to confirm their changes and update the list control to reflect it. It looks something like this:
void CPropertyPage::OnApplyChanges()
{
// Make changes
int nSel = m_lcReagents.GetSelectionMark();
PopulateListControl(); // Refreshes list control data
m_lcReagents.SetSelectionMark(nSel);
}
I called GetSelectionMark() after setting the selection mark (to make sure it was working properly), and the index of the item I wanted selected was returned, so it should be working right. However, none of the items in the list control were highlighted, and I'm trying to figure out why.