Defines a deletion callback routine, called when items are deleted.
C
BOOL WINAPI SftBox_SetDeleteCallback(HWND hwndCtl, LPSFTBOX_DELETEPARM lpDelete);C++
BOOL CSftBox::SetDeleteCallback(LPSFTBOX_DELETEPARM lpDelete);hwndCtl
The window handle of the combo box control.
lpDelete
A pointer to a SFTBOX_DELETEPARM structure containing the parameters for this function to register a callback function and user supplied data. This parameter may be NULL to remove a previously defined callback function. The SFTBOX_DELETEPARM structure contains the following members:
| SFTBOX_DELETEPROC lpfnDelete | A user supplied routine which is called every time an item is deleted. This member may be NULL to stop using the callback function. |
| SFTBOX_DWORD_PTR UserData | User supplied, application-specific data, which is passed to the callback function. |
The return value is always TRUE.
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. The callback function receives the window handle of the combo box control, the index of the item, the item's application-defined value (see SetItemData) and the UserData value of the SFTBOX_DELETEPARM structure.
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);
SftBox_SetReorderColumns(m_hwndStyle, FALSE);
SftBox_SetShowHeader(m_hwndStyle, SFTBOX_COLSTYLE_BUTTONTEXT);
InitColumn(&aCols[0], 0, 174, _T("Font Name"));
InitColumn(&aCols[1], 1, 400, _T("Sample"));
m_Fonts.SetColumns(2, aCols);
SetSortIndicator(m_Fonts, m_fFontsDescending);
// Use a delete callback routine
Parm.lpfnDelete = FontsDeleteCallback;
Parm.UserData = (SFTBOX_DWORD_PTR) this;
m_Fonts.SetDeleteCallback(&Parm);
// FONT STYLE combo box
m_Style.SetSelectionStyle(SFTBOX_SELECTION_CELL1);
m_Style.SetDroppedHeight(4);
m_Style.SetResizeHeader(FALSE);
m_Style.SetReorderColumns(FALSE);
m_Style.SetShowHeader(SFTBOX_COLSTYLE_BUTTONTEXT);See Also C/C++ API | Categories | Notifications