Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

DeleteCallback

Defines a deletion callback routine, called when items are deleted.

C

BOOL WINAPI SftTree_SetDeleteCallback(HWND hwndCtl, LPCSFTTREE_DELETEPARM lpDelete);
BOOL WINAPI SftTreeSplit_SetDeleteCallback(HWND hwndCtl, LPCSFTTREE_DELETEPARM lpDelete);

C++

BOOL CSftTree::SetDeleteCallback(LPSFTTREE_DELETEPARM lpDelete = NULL);
BOOL CSftTreeSplit::SetDeleteCallback(LPSFTTREE_DELETEPARM lpDelete = NULL);

Parameters

hwndCtl

The window handle of the tree control.

lpDelete

A pointer to a SFTTREE_DELETEPARM structure containing the parameters for this function to register a callback function and user supplied data. This parameter may be NULL to stop using the callback function. The SFTTREE_DELETEPARM structure contains the following members:

SFTTREE_DELETEPROC lpfnDeleteA user supplied routine which is called every time an item is deleted.
SFTTREE_DWORD_PTR UserDataUser supplied, application-specific data.

Returns

The return value is TRUE if the function was successful, otherwise FALSE is returned if an error occurred.

Comments

The SetDeleteCallback function defines a deletion callback routine, called when items are deleted.

The callback receives control when an item is about to be deleted. The callback can then perform application specific cleanup processing for the item being deleted. The callback routine is called immediately before the item is deleted.

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

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