MFC: Why when deleting the last item of a ListBox (becomes empty) the virtual function DeleteItem() is not called?
Using MFC I sub-classed the CListBox
(CBCGPListBox – for themes) to send selection change notifications when items are deleted. This works fine for all items except the very last item deleted from the list box (list box becomes empty). In that case the DeleteItem()
virtual function is NOT called. It seems strange to me that it wouldn’t be called? Is there some other message or virtual function that deals with that?
MFC: Why when deleting the last item of a ListBox the virtual function DeleteItem() is not called?
Using MFC I sub-classed the CListBox
(CBCGPListBox – for themes) to send selection change notifications when items are deleted. This works fine for all items except the very last item deleted from the list box. In that case the DeleteItem()
virtual function is NOT called. It seems strange to me that it wouldn’t be called? Is there some other message or virtual function that deals with that?