Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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  
);

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.

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.

NoteNote:

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.

Header: afxwin.h

Community Additions

ADD
Show:
© 2015 Microsoft