CComboBox::GetItemDataPtr
Visual Studio 2012
Retrieves the application-supplied 32-bit value associated with the specified combo-box item as a pointer (void*).
void* GetItemDataPtr( int nIndex ) const;
LPVOID lpmyPtr = m_pComboBox->GetItemDataPtr(5); // Check all the items in the combo box; if an item's // data pointer is equal to my pointer then reset it to NULL. for (int i = 0; i < m_pComboBox->GetCount(); i++) { if (m_pComboBox->GetItemDataPtr(i) == lpmyPtr) { m_pComboBox->SetItemDataPtr(i, NULL); } }