HeaderPane
Main
Hide
Share Link
Print

SFTBOX_DELETEPROC Type Definition

Defines the type of a user-supplied callback routine, called by SftBox/DLL whenever an item is removed from the combo box control.

typedef void (CALLBACK* SFTBOX_DELETEPROC)(HWND hwnd, LONG index, SFTBOX_DWORD_PTR itemData, SFTBOX_DWORD_PTR UserData);

Parameters

hwnd

The window handle of the combo box control.

index

The zero-based index of the item being deleted.

itemData

The application-specific value associated with the item being deleted, set using SetItemData.

UserData

An application-specific value, as supplied in the SFTBOX_DELETEPARM structure.

Comments

A deletion callback is defined using SetDeleteCallback. The callback receives control when an item is about to be deleted and can perform application-specific cleanup processing for the item, such as freeing data addressed by the item's itemData value. The callback routine is called immediately before the item is deleted.

If cell data is used, GetCellInfo can be used to retrieve the cell information of the item being deleted.

The callback must not update the combo box control in any way.

Examples

C View entire sample code

    SftBox_SetDarkMode(m_hwndFonts, SFTBOX_DARKMODE_AUTO);

    InitColumn(&aCols[0], 0, 174, TEXT("Font Name"));
    InitColumn(&aCols[1], 1, 400, TEXT("Sample"));
    SftBox_SetColumns(m_hwndFonts, 2, aCols);
    SetSortIndicator(m_hwndFonts, m_fFontsDescending);

    // Use a delete callback routine
    Parm.lpfnDelete = (SFTBOX_DELETEPROC) FontsDeleteCallback;
    Parm.UserData = 0;
    SftBox_SetDeleteCallback(m_hwndFonts, &Parm);

    // FONT STYLE combo box
    SftBox_SetSelectionStyle(m_hwndStyle, SFTBOX_SELECTION_CELL1);
    SftBox_SetDroppedHeight(m_hwndStyle, 4);
    SftBox_SetResizeHeader(m_hwndStyle, FALSE);

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


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