CComboBox::SetItemDataPtr

int SetItemDataPtr( int nIndex, void* pData );

Return Value

CB_ERR if an error occurs.

Parameters

nIndex

Contains a zero-based index to the item.

pData

Contains the pointer to associate with the item.

Remarks

Sets the 32-bit value associated with the specified item in a combo box to be the specified pointer (void*). This pointer remains valid for the life of the combo box, even though the item’s relative position within the combo box might change as items are added or removed. Hence, the item’s index within the box can change, but the pointer remains reliable.

CComboBox OverviewClass MembersHierarchy Chart

See Also   CComboBox::GetItemData, CComboBox::GetItemDataPtr, CComboBox::SetItemData, CB_SETITEMDATA, CComboBox::AddString, CComboBox::InsertString