CListBox::SetItemData
Sets a 32-bit value associated with the specified item in a list box.
int SetItemData(
int nIndex,
DWORD_PTR dwItemData
);
Параметры
nIndex
Specifies the zero-based index of the item.dwItemData
Specifies the value to be associated with the item.
Возвращаемое значение
LB_ERR if an error occurs.
Пример
// Set the data of each item to be equal to its index.
for (int i=0;i < m_myListBox.GetCount();i++)
{
m_myListBox.SetItemData(i, i);
}
Требования
Header: afxwin.h