HeaderPane
Main
Hide
Share Link
Print

SFTBOX_TOOLTIPSPROC Type Definition

Defines the type of a user-supplied callback routine, called by SftBox/DLL to allow an application to define the text shown when a ToolTip or ScrollTip is about to be displayed.

typedef void (CALLBACK* SFTBOX_TOOLTIPSPROC)(HWND hwnd,
        LPTSTR lpszBuffer,              /* ptr to buffer for tooltip text */
        int type,                       /* type of tooltip to be shown */
#define SFTBOX_TOOLTIP_VSCROLL     1    // scrolling tooltip
#define SFTBOX_TOOLTIP_CELL        2    // cell tooltip
#define SFTBOX_TOOLTIP_COLUMN      3    // column header tooltip
#define SFTBOX_TOOLTIP_ROW         4    // row header tooltip
#define SFTBOX_TOOLTIP_ROWCOLUMN   5    // row/column header tooltip
        LONG index,                     /* index of cell/row */
        int column,                     /* column # of cell/column */
        SFTBOX_DWORD_PTR UserData,      /* userdata */
        BOOL * lpfInPlace);             /* set to False for explanatory tooltip */

Parameters

hwnd

The window handle of the combo box control. The callback is used for ToolTips of the static portion and of the dropdown portion.

lpszBuffer

A pointer to a 1024 character buffer (including the terminating '\0') where the application can store the text for the requested ToolTip or ScrollTip.

type

Identifies the type of the ToolTip about to be displayed. The following values are defined:

SFTBOX_TOOLTIP_VSCROLLThe user is scrolling vertically using the scroll bar thumb. lpszBuffer defines the text to be displayed in the ScrollTip. index is the index of the first item currently displayed. column is the column number of the first displayed column. On entry, lpszBuffer contains the text of that cell (an empty string if the text has 1000 or more characters), which is displayed if the callback does not change the buffer. If the callback sets lpszBuffer to an empty string, no ScrollTip is displayed. lpfInPlace is ignored.
SFTBOX_TOOLTIP_CELLA cell ToolTip is about to be displayed for the cell of the item index in column column. On entry, lpszBuffer is an empty string and lpfInPlace is TRUE. If text is copied to lpszBuffer, it is displayed as an explanatory ToolTip (lpfInPlace is ignored). If lpszBuffer remains an empty string and lpfInPlace is TRUE, the default cell ToolTip is displayed. If lpszBuffer remains an empty string and lpfInPlace is set to FALSE, the ToolTip is suppressed.
SFTBOX_TOOLTIP_COLUMNA column header ToolTip is about to be displayed for column column. index is -1. The text copied to lpszBuffer is displayed as an explanatory ToolTip. If lpszBuffer remains an empty string, no ToolTip is displayed. lpfInPlace is ignored.
SFTBOX_TOOLTIP_ROWReserved.
SFTBOX_TOOLTIP_ROWCOLUMNReserved.

index

The zero-based index of the item for which a ToolTip or ScrollTip is about to be displayed (SFTBOX_TOOLTIP_CELL and SFTBOX_TOOLTIP_VSCROLL only). For a cell ToolTip in the static portion, index is the index of the selected item (see GetCurSel), which is the item the static portion displays.

column

The zero-based column number for which a ToolTip or ScrollTip is about to be displayed.

UserData

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

lpfInPlace

A pointer to a BOOL variable. Only used if a cell ToolTip (SFTBOX_TOOLTIP_CELL) is about to be displayed. Otherwise, lpfInPlace has no effect.

Comments

A ToolTips callback is defined using SetToolTipsCallback. The callback receives control when a ToolTip or ScrollTip is about to be displayed. It can determine the text to be displayed by copying it to the buffer lpszBuffer.

Cell ToolTips are enabled for each column using the SFTBOX_TOOLTIP style in the SFTBOX_COLUMN structure member style. ScrollTips are enabled using SetScrollTips.

The callback must not update the combo box control in any way, but can retrieve control and item information.

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


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