CWnd::OnDeleteItem

The framework calls this member function to inform the owner of an owner-draw list box or combo box that the list box or combo box is destroyed or that items have been removed by CComboBox::DeleteString, CListBox::DeleteString, CComboBox::ResetContent, or CListBox::ResetContent.

afx_msg void OnDeleteItem(
   int nIDCtl,
   LPDELETEITEMSTRUCT lpDeleteItemStruct 
);

Parameters

  • nIDCtl
    The identifier of the control that sent the WM_DELETEITEM message.

  • lpDeleteItemStruct
    Specifies a long pointer to a DELETEITEMSTRUCT data structure that contains information about the deleted list box item.

Remarks

If the hwndItem member of the DELETEITEMSTRUCT structure belongs to a combo box or list box, then the DeleteItem virtual function of the appropriate class is called. Override the DeleteItem member function of the appropriate control's class to delete item-specific data.

Hinweis

This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

Requirements

Header: afxwin.h

See Also

Concepts

CWnd Class

CWnd Members

Hierarchy Chart

CComboBox::DeleteString

CListBox::DeleteString

CComboBox::ResetContent

CListBox::ResetContent

WM_DELETEITEM

CListBox::DeleteItem

CComboBox::DeleteItem