Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

SFTTREE_TOOLTIPSPROC Type Definition

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

typedef void (CALLBACK* SFTTREE_TOOLTIPSPROC)(
        HWND hwnd, 
        LPTSTR lpszBuffer,              // pointer to buffer for tooltip text
        int type,                       // type of tooltip to be shown
#define SFTTREE_TOOLTIP_VSCROLL     1   // scrolling tooltip
#define SFTTREE_TOOLTIP_CELL        2   // cell tooltip
#define SFTTREE_TOOLTIP_COLUMN      3   // column header tooltip (replaced by SFTTREE_TOOLTIP_COLUMN_HEADER)
#define SFTTREE_TOOLTIP_ROW         4   // row header tooltip
#define SFTTREE_TOOLTIP_ROWCOLUMN   5   // row/column header tooltip
#define SFTTREE_TOOLTIP_COLUMN_HEADER 3 // column header tooltip
#define SFTTREE_TOOLTIP_COLUMN_FOOTER 6 // column footer tooltip

        int index,                      // index of cell/row
        int column,                     // column # of cell/column
        SFTTREE_DWORD_PTR UserData,     // application-defined data
        BOOL * lpfInPlace);             // set to FALSE for explanatory tooltip

Parameters

hwnd

The window handle of the tree control.

lpszBuffer

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

type

Identifies the type of the current ToolTip about to be displayed. Future releases of SftTree/DLL may define additional type values. Currently, the following are defined:

SFTTREE_TOOLTIP_VSCROLLThe user is scrolling vertically. lpszBuffer defines the text to be displayed in the ScrollTip. index is the item index of the first item currently displayed in the tree control client area. column is the column number of the first visible column number (column width is greater than 0). lpszBuffer defaults to the contents of the first displayed cell (item index). lpfInPlace is ignored by SftTree/DLL.
SFTTREE_TOOLTIP_CELLA cell ToolTip is about to be displayed. The ToolTip is displayed for the cell at index index and column column. lpszBuffer defines the text to be displayed and is an empty string by default. If text is copied to lpszBuffer, it is displayed as an explanatory ToolTip (lpfInPlace is ignored). If lpszBuffer is set to an empty string and lpfInPlace is set to TRUE, the default cell ToolTip is displayed. If lpszBuffer is set to an empty string and lpfInPlace is set to FALSE, the ToolTip is completely suppressed.
SFTTREE_TOOLTIP_COLUMNProvided for compatibility with older versions - use SFTTREE_TOOLTIP_COLUMN_HEADER instead.
SFTTREE_TOOLTIP_ROWReserved for future use.
SFTTREE_TOOLTIP_ROWCOLUMNReserved for future use.
SFTTREE_TOOLTIP_COLUMN_HEADERA column header ToolTip is about to be displayed for column column. index is undefined. The text copied to lpszBuffer is displayed as an explanatory ToolTip. lpfInPlace is ignored by SftTree/DLL.
SFTTREE_TOOLTIP_COLUMN_FOOTERA column footer ToolTip is about to be displayed for column column. index is undefined. The text copied to lpszBuffer is displayed as an explanatory ToolTip. lpfInPlace is ignored by SftTree/DLL.

index

A value specifying the zero-based index of the item for which a ToolTip is about to be displayed (used for SFTTREE_TOOLTIP_CELL and SFTTREE_TOOLTIP_VSCROLL only).

column

A value specifying the zero-based column number for which a ToolTip is about to be displayed.

UserData

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

lpfInPlace

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

Comments

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

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. ToolTips are enabled for each column in the SFTTREE_COLUMN_EX structure member style. ScrollTips are enabled using SetScrollTips.

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

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