HeaderPane
Main
Hide
Share Link
Print

DeleteDependents

Deletes an item's dependent items.

C

LONG WINAPI SftBox_DeleteDependents(HWND hwndCtl, LONG indexTC);

C++

LONG CSftBox::DeleteDependents(LONG indexTC);

Parameters

hwndCtl

The window handle of the combo box control.

indexTC

The zero-based index of the item, whose dependents are to be deleted.

Returns

The return value is the number of items remaining in the combo box control. The return value is -1 if an error occurred.

Comments

The DeleteDependents function deletes an item's dependent items.

By deleting an item's dependents, the item becomes a leaf item which can no longer be expanded or collapsed. It is not an error to use DeleteDependents if an item doesn't have any dependents.

The item described by indexTC is not deleted. To delete an item, DeleteString can be used.

If a deletion callback routine has been defined (see SetDeleteCallback), the callback is invoked for each item deleted from the combo box control.

If the dropdown portion of a dropdown or dropdown list combo box is visible, it is hidden when DeleteDependents is called. This can be suppressed using SetRollupOnChange.

In a combo box control using a virtual data source, this function cannot be used and an error is returned.

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.