Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Deletes the item in position nIndex from the list box.
int DeleteString(
UINT nIndex
);
Parameters
- nIndex
Specifies the zero-based index of the string to be deleted.
Return Value
A count of the strings remaining in the list. The return value is LB_ERR if nIndex specifies an index greater than the number of items in the list.
Remarks
All items following nIndex now move down one position. For example, if a list box contains two items, deleting the first item will cause the remaining item to now be in the first position. nIndex=0 for the item in the first position.
Example
// Delete every other item from the list box.
for (int i = 0; i < m_myListBox.GetCount(); i++)
{
m_myListBox.DeleteString(i);
}
Requirements
Header: afxwin.h