Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Sets a 32-bit value associated with the specified item in a list box.
int SetItemData(
   int nIndex,
   DWORD_PTR dwItemData 
);
Parameters
nIndex
Specifies the zero-based index of the item.dwItemData
Specifies the value to be associated with the item.
Return Value
LB_ERR if an error occurs.
Example
// 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);
}
Requirements
Header: afxwin.h