ItemSelected example for C++ 5.0 and later

void CBrowseDlg::OnItemSelectedLeadimglistctrl1(long nIndex) 
{
   this->SetWindowText(m_LEADImageList.Item(nIndex).GetText() + TEXT(" was selected!"));
}