This documentation is archived and is not being maintained.


Called by the framework when the user deletes an item from an owner-draw CComboBox object or destroys the combo box.

virtual void DeleteItem( 
   LPDELETEITEMSTRUCT lpDeleteItemStruct  


A long pointer to a Windows DELETEITEMSTRUCT structure that contains information about the deleted item. See CWnd::OnDeleteItem for a description of this structure.

The default implementation of this function does nothing. Override this function to redraw the combo box as needed.

// CMyComboBox is my owner-drawn combo box derived from CComboBox. This  
// example simply dumps the item's text. The combo box control was  
// created with the following code: 
//   pmyComboBox->Create( 
//      myRect, pParentWnd, 1); 
void CMyComboBox::DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct) 
   ASSERT(lpDeleteItemStruct->CtlType == ODT_COMBOBOX);
   LPTSTR lpszText = (LPTSTR) lpDeleteItemStruct->itemData;
   ASSERT(lpszText != NULL);


Header: afxwin.h