Sdílet prostřednictvím


CComboBox::DeleteItem

Při odstranění položky z vlastníka draw nazývá rámcem CComboBox objektu nebo pole se seznamem zničí.

virtual void DeleteItem(
   LPDELETEITEMSTRUCT lpDeleteItemStruct 
);

Parametry

Poznámky

Výchozí implementace této funkce neprovede žádnou akci.Tato funkce překreslení pole se seznamem, v případě potřeby potlačit.

Příklad

// 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(
//      WS_CHILD|WS_VISIBLE|WS_BORDER|WS_HSCROLL|WS_VSCROLL|
//      CBS_SORT|CBS_OWNERDRAWVARIABLE,
//      myRect, pParentWnd, 1);
//
void CMyComboBox::DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct) 
{
   ASSERT(lpDeleteItemStruct->CtlType == ODT_COMBOBOX);
   LPTSTR lpszText = (LPTSTR) lpDeleteItemStruct->itemData;
   ASSERT(lpszText != NULL);

   AFXDUMP(lpszText);
}

Požadavky

Záhlaví: afxwin.h

Viz také

Referenční dokumentace

Třída CComboBox

Diagram hierarchie

CComboBox::CompareItem

CComboBox::DrawItem

CComboBox::MeasureItem

WM_DELETEITEM