Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

C/C++ API (By Category)

Direct calls to the SftTree DLLs are used to communicate with the tree control for maximum efficiency.

The class CSftTree defines all necessary functions to communicate with the tree control. The class CSftTreeSplit defines a split tree control.

The API Reference section lists C and C++ macros and functions. They are sorted alphabetically, but leading SftTree_, SftTree_Get and SftTree_Set text is not considered. E.g., when looking up the function SftTree_GetCurSel, look for topic CurSel, the leading SftTree_Get is dropped.

The following function groups are listed in detail:

ApplicationApplication initialization and termination
AttributesGeneral tree control attributes
Callback RoutinesApplication-defined callback routines
Columns, Column Headers and FootersColumn and column header/column footer attributes
Current Item, SelectionThe currently selected item
Drag & DropDrag & drop support functions
Item AttributesItem and cell attributes
Item Hit TestingHit testing
ItemsItem manipulation
Positioning & ResizingItem positioning and resizing
RelationshipsRetrieving parent/child relationship information
Row/Column FooterRow/column footer attributes
Row/Column HeaderRow/column header attributes
Row HeaderRow header attributes
ScrollingScrolling manipulation
SortingSorting items
Split Tree ControlSplit tree control and splitter bar manipulation
Virtual ModeUsing a virtual data source

Application

RegisterAppRegisters an application with SftTree/DLL.
UnregisterAppUnregisters an application from SftTree/DLL.
FreeGDIPlusImageLoadedFromResourceDeletes a GDI+ image obtained using SftTree_LoadGDIPlusImageFromResource.
LoadGDIPlusImageFromResourceLoads a GDI+ image from an application's or DLL's resources.

Attributes

~CSftTreeStandard destructor.
~CSftTreeSplitStandard destructor.
AutoExpandDefines whether items are automatically expanded when the mouse hovers over a collapsed parent item.
AutoExpandItemReturns the zero-based index of the item to be expanded as a result of a call to StartAutoExpandTimer or SetAutoExpand.
BackgroundBitmapDefines a background bitmap used as the background for the tree control.
BitmapsRegisters the size and sets the default item pictures used for all items.
ButtonsRegisters the size and sets the bitmaps used for expand/collapse buttons.
CalcLimitDefines the maximum number of items to consider for optimal column width and scrolling calculation.
CalcVisibleOnlyDefines whether only visible items are considered for optimal column width and scrolling calculation.
CharSearchModeDefines the method used to search for matching items in response to characters typed by the user.
ControlDataDefines an application-defined value.
ControlInfoDefines the tree control's attributes.
CreateCreates a tree control window and attaches it to the CSftTree or CSftTreeSplit object.
CSftTreeStandard constructor.
CSftTreeSplitStandard constructor.
CtlColorsDefines the tree control's color attributes.
CustomCodeDefines optional product customization.
FlybyDefines whether flyby highlighting is enabled.
FlybyIndexReturs the index of the highlighted item for flyby highlighting.
ForwardChildMsgsDefines the child window message handling status.
GridStyleDefines the grid line display style.
IndentationDefines the indentation (in pixels) for item levels.
InheritBgColorDefines whether the area to the left of the first cell inherits the cell's background color.
ItemLinesDefines the number of text lines used for item height calculation.
ItemsShownReturns the number of items displayable in the tree control's client area, including partial items.
ItemsShownCompleteReturns the number of items displayable in the tree control's client area, not including partial items.
KeyHandlingDefines keystrokes intercepted during cell editing.
NoFocusStyleDefines the display style of selected items when the tree control does not have the input focus.
PicturesRegisters the size and sets the default item pictures used for all items.
PlusMinusDefines the plus/minus bitmaps used for all items.
ScrollTipsDefines whether ScrollTips are displayed during vertical scrolling.
SFT_PICTUREUsed to describe a picture component (a bitmap, icon or ImageList image, etc.).
SFTTREE_CLASSDefines the window class name of a tree control without splitter bar.
SFTTREE_COLORSUsed with GetCtlColors and SetCtlColors to retrieve and set a tree control's color attributes.
SFTTREE_CONTROLUsed with GetControlInfo and SetControlInfo to retrieve and set tree control attributes.
SFTTREE_DWORD_PTRDefines a type large enough to hold a DWORD or pointer value.
SFTTREE_IDDefines the type of an item ID.
SFTTREE_MAXLEVELSDefines the maximum number of levels supported.
SFTTREE_NOCOLORUsed to indicate that the default color should be used.
SFTTREE_OBSOLETE_4Used to indicate compatibility with SftTree/DLL 4.0 (and older).
SFTTREESPLIT_CLASSDefines the window class name of a tree control with splitter bar.
Show3DDefines the current display method used for items.
ShowBitmapsReturns a value indicating the presence of item pictures.
ShowButton0Defines the presence of level 0 expand/collapse buttons.
ShowButtonsDefines the presence of expand/collapse buttons (other than level 0).
ShowGridDefines the presence of grid lines.
ShowLabelsReturns the presence of label pictures.
ShowPlusMinusReturns the presence of plus/minus bitmaps.
ShowTruncatedDefines whether text is clipped or truncated using trailing "...".
TabKeyInterceptDefines the status of Tab key handling during cell editing.
ToolTipAlwaysDefines whether ToolTips are shown even if cell text is not truncated.
ToolTipsUseEntireCellDefines whether ToolTips use the entire cell.
TreeLineStyleDefines the display style of tree lines.
UpdateCaretExpandCollapseDefines whether the current location (caret) is updated when the expand/collapse buttons are used.
UseSmoothScrollDefines whether smooth scrolling is used.
UseThemesDefines whether the control can use Windows themes.
VAlignDefines the vertical alignment of tree lines, label pictures, plus/minus bitmap and item pictures.

Callback Routines

DeleteCallbackDefines a deletion callback routine, called when items are deleted.
LPFNSFTTREE_OWNERDRAWPROCDefines the type of an application-supplied owner-draw function, which is called whenever an object needs to be rendered.
OwnerDrawCallbackDefines an application-supplied owner-draw function, which is called whenever an object needs to be rendered.
SFTTREE_DELETEPARMUsed to define an application-specific deletion callback routine, which is called whenever an item is removed from the tree control.
SFTTREE_DELETEPROCDefines the type of a user-supplied callback routine, called by SftTree/DLL whenever an item is removed from the tree control.
SFTTREE_OWNERDRAWUsed as parameter for an application-supplied owner-draw function of type LPFNSFTTREE_OWNERDRAWPROC.
SFTTREE_OWNERDRAWPARMUsed to define an application-specific owner-draw callback routine, which is called whenever an object needs to be rendered.
SFTTREE_TOOLTIPSPARMUsed as parameter for SetToolTipsCallback, to define an application-specific ToolTips callback routine, which can define the ToolTip text when a ToolTip or ScrollTip is to be displayed.
SFTTREE_TOOLTIPSPROCDefines 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.
ToolTipsCallbackDefines an application supplied callback function, which can define the ToolTip text when a ToolTip or ScrollTip is to be displayed.

Columns, Column Headers and Footers

ColumnsDefines the number of columns and column attributes.
CrossColumnResizeDefines whether multiple columns can be resized during one column resizing operation.
DisplayColumnReturns the display column number given a real column number.
DisplayFooterDropDownRectReturns the dimensions of the column footer dropdown/filter button.
DisplayFooterRectReturns the dimensions of the column footer area.
DisplayHeaderDropDownRectReturns the dimensions of the column header dropdown/filter button.
DisplayHeaderRectReturns the dimensions of the column header area.
FirstDisplayColumnReturns the index of the first displayed column.
FooterDefines a column's footer text.
FooterButtonDefines the column number of the currently pressed column footer button.
FooterFontDefines the font used for column footer text display.
FooterLengthReturns the length of a column's footer text.
FooterRectReturns the dimensions of the column footer area.
HeaderDefines a column's header text.
HeaderButtonDefines the column number of the currently pressed column header button.
HeaderFontDefines the font used for column header text display.
HeaderLengthReturns the length of a column's header text.
HeaderRectReturns the dimensions of the column header area.
LastDisplayColumnReturns the index of the last displayed column.
MultilineFooterDefines whether column footers can display multiple lines of text.
MultilineHeaderDefines whether column headers can display multiple lines of text.
OpenEndedDefines whether the last column is open-ended.
OverheadWidthReturns the width of the area added to the first column for hierarchical graphics components.
RealColumnReturns the real column number given a display column number.
ReorderColumnsDefines whether columns can be reordered using column drag & drop.
ResizeColumnReturns the column number of the column being resized.
ResizeFooterDefines whether column footers are resizable by the user.
ResizeHeaderDefines whether column headers are resizable by the user.
SFTTREE_COLUMN_EXUsed with GetColumns and SetColumns to retrieve and set column attributes.
ShowFooterDefines the presence of column footers.
ShowFooterButtonsDefines the presence of column footers buttons.
ShowHeaderDefines the presence of column headers.
ShowHeaderButtonsDefines the presence of column header buttons.

Current Item, Selection

CaretColumnReturns the column where a mouse button was last clicked.
CaretIndexDefines the current item (caret location).
ClickAgainPosReturns the location of the item that was clicked again.
CurSelDefines the index of the selected item (single selection tree control).
DrawSelectionOutlineDraws a selection outline.
RubberbandSelectionDefines whether click-drag selection of multiple items using a selection rectangle is supported.
SelDefines the selection status of an item (multiple selection tree only).
SelCountReturns the number of currently selected items (multiple selection tree only).
SelectionAreaDefines the area where selection changes occur.
SelectionStyleDefines the display style of selected items.
SelectStringSearches a string and selects the matching item.
SelectStringExactSearches a string and selects the matching item.
SelItemRangeSelects or deselects a range of items (multiple selection tree only).
SelItemsFills an array with the index numbers of currently selected items.
SelItemsArrayReturns an array of SFTTREE_SELENTRY structures describing groups of selected items.
SFTTREE_SELENTRYUsed by GetSelItemsArray to return an array of structures describing groups of selected items.
ShowFocusDefines whether a focus rectangle is drawn around the current item when the tree control has the input focus.

Drag & Drop

DragBitmapsDefines the drag & drop starting location attribute.
DragImageReturns a drag image representing the currently selected items.
DragInfoReturns drag & drop operation information in a SFTTREE_DRAGINFO structure.
DragTypeDefines the drag & drop detection attribute.
DropHighlightDefines the current drag & drop target location.
DropHighlightStyleDefines the display attribute of the current drag & drop target item.
SFTTREE_DRAGINFOUsed during drag & drop operations and can be retrieved using GetDragInfo.
StartAutoExpandTimerStarts a timer for the specified item, so a SFTTREEN_AUTOEXPANDING notification will be sent.
StopAutoExpandTimerEnds a started SFTTREEN_AUTOEXPANDING notification timer.

Item Attributes

AdjustCellEditRectReturns a cell's location in client area coordinates of the left or right pane of a split tree control.
CellEditWindowReturns the window containing the specified cell in a split tree control.
CellInfoDefines a cell's attributes.
CellRectInfoReturns the location of a cell, the cell text and cell picture.
CellRectInfoExReturns the location of a cell, the cell text and cell picture.
DisplayCellRectReturns the location of a cell.
DisplayCellRectForItemReturns the location of a cell.
ExpandCollapseButtonRectReturns the location of an item's expand/collapse button.
ExpandCollapseIndexReturns the zero-based index of the item to expand/collapse.
ItemBitmapDefines an item's item picture.
ItemBitmapAlignDefines whether item pictures of items are aligned with the cells of the immediate parent level.
ItemDataDefines an item's application-specific value.
ItemEditIgnoreDefines whether an item is ignored for cell editing.
ItemExpandDefines an item's expand status.
ItemExpandableDefines whether an item is expandable.
ItemExpandCollapseButtonDefines whether an item's expand/collapse button is shown.
ItemHeightReturns an item's height (in pixels).
ItemHeightMinMaxDefines an item's minimum and maximum height (in pixels).
ItemIDDefines an item's ID.
ItemIgnoreDefines whether the item is excluded from optimal column width and row header width calculation.
ItemIndexReturns an item's index given an item ID.
ItemLabelDefines an item's label picture information.
ItemLabelPictureDefines an item's label picture information.
ItemLevelDefines an item's level number.
ItemPictureDefines an item's item picture.
ItemPictureAlignDefines whether item pictures of items are aligned with the cells of the immediate parent level.
ItemRectReturns an item's location in client area coordinates.
ItemShownDefines an item's visibility status.
ItemStatusDefines an item's enabled/disabled status.
SFTTREE_CELLUsed with GetCellInfo/SetCellInfo to retrieve and set cell attributes and as part of the SFTTREE_ITEM structure (for a virtual data source).
SFTTREE_CELLINFOPARMUsed as parameter for GetCellInfo and SetCellInfo to retrieve and set cell attributes.
TextDefines an item's cell text.
TextLengthReturns the length of an item's cell text.

Item Hit Testing

CalcCellFromPointCalculates the item index and column number given a point in tree control client area coordinates.
CalcColumnFromPointCalculates the column number given a point in tree control client area coordinates.
CalcIndexFromPointCalculates the item index number given a point in tree control client area coordinates.

Items

AddStringAdds a new item to a tree control. The new item is added as the last item at level 0.
CollapseCollapses a parent item.
CopyItemsCopies a group of items to a new location.
DeleteDependentsDeletes an item's dependent items.
DeleteStringDeletes an item.
ExpandExpands a parent item.
FindItemSearches item data.
FindStringSearches a string.
FindStringExSearches cells for a string.
FindStringExactSearches a string.
CountReturns the number of items in the tree control.
InsertStringInserts a new item using a string.
MoveItemsMoves a group of items to a new position in the tree control.
ResetContentRemoves all items from the tree control.

Positioning & Resizing

CalcOptimalCellDimensionsCalculates a cell's optimal height and width so its contents aren't truncated.
CalcOptimalColumnWidthCalculates a column's optimal width so text and pictures are not clipped.
CalcOptimalRowHeaderWidthCalculates the optimal width for row headers so text and pictures are not clipped.
TopIndexDefines the index number of the item shown at the top of the tree control.
MakeCellVisibleScrolls the specified cell into view horizontally and vertically so that it is displayed in the tree control's client area.
MakeColumnOptimalSets the optimal column width so that the text and pictures of all items can be displayed without being clipped horizontally.
MakeColumnVisibleScrolls the specified column into view horizontally so that it is displayed in the tree control's client area.
MakeIntegralHeightResizes the tree control vertically so visible items are displayed in their entirety.
MakeRowHeaderOptimalSets the optimal row header width so that the text and pictures of all row headers can be displayed.
MakeRowVisibleScrolls the specified item into view vertically so that it is displayed in the tree control's client area.

Relationships

DependentReturns dependent item information for a parent item.
DependentCountReturns the number of dependents for a parent item.
NextShownReturns the next visible item.
ParentReturns an item's parent index.
PrevShownReturns the previous visible item.
SiblingReturns an item's sibling information.
TopParentReturns the highest level parent index number for an item.

Row/Column Footer

RowColFooterButtonDefines whether the row/column footer button is currently down (pressed).
RowColFooterPictureDefines the picture displayed in the row/column footer.
RowColFooterPictureStyleDefines the position of the picture displayed in the row/column footer.
RowColFooterRectReturns the dimensions of the row/column footer area.
RowColFooterStyleDefines the position of the text displayed in the row/column footer.
RowColFooterTextDefines the row/column footer text.
RowColFooterTextLengthReturns the row/column footer text length.
ShowRowColFooterButtonDefines the row/column footer's display style.

Row/Column Header

RowColBitmapDefines the picture displayed in the row/column header.
RowColBitmapStyleDefines the position of the picture displayed in the row/column header.
RowColHeaderButtonDefines whether the row/column header button is currently down (pressed).
RowColHeaderPictureDefines the picture displayed in the row/column header.
RowColHeaderPictureStyleDefines the position of the picture displayed in the row/column header.
RowColHeaderRectReturns the dimensions of the row/column header area.
RowColHeaderStyleDefines the position of the text displayed in the row/column header.
RowColHeaderTextDefines the row/column header text.
RowColHeaderTextLengthReturns the row/column header text length.
RowColPictureDefines the picture displayed in the row/column header.
RowColPictureStyleDefines the position of the picture displayed in the row/column header.
RowColTextDefines the row/column header text.
RowColTextLengthReturns the row/column header text length.
ShowRowColHeaderButtonDefines the row/column header's display style.

Row Header

RowHeaderFontDefines the font used for row header text display.
RowHeaderLinesDefines the number of text lines used for row header height calculation.
RowHeaderRectReturns the dimensions of the row header area.
RowHeaderStyleDefines the position of text displayed in the row headers.
RowHeaderWidthDefines the width of the row header area.
RowInfoDefines an item's row header attributes.
RowTextDefines an item's row header text.
RowTextLengthReturns an item's row header text length.
SFTTREE_ROWUsed with GetRowInfo and SetRowInfo and as part of the SFTTREE_ITEM structure (for a virtual data source).
SFTTREE_ROWINFOPARMUsed as parameter for GetRowInfo and SetRowInfo to retrieve and set row header attributes.
ShowRowHeaderDefines the row header display style.

Scrolling

DisableNoScrollDefines the scroll bar handling status.
HorizontalExtentDefines the horizontal extent (in pixels) of the displayable area.
HorizontalOffsetDefines the current horizontal offset (in pixels) of the displayed area.
RecalcHorizontalExtentRecalculates the optimal horizontal scrolling extent.

Sorting

EnableSortIndicatorsEnables sort indicators in column headers.
ResetSortIndicatorsRemoves all sort indicators from all columns.
SFTTREE_SORTPROC_CELLDATADefines the type of a user-supplied callback routine, called by SftTree/DLL to allow an application to sort items using SortDependents.
SFTTREE_SORTPROC_ITEMDefines the type of a user-supplied callback routine, called by SftTree/DLL to allow an application to sort items using SortDependents.
SFTTREE_SORTPROCEXDefines the type of a user-supplied callback routine, called by SftTree/DLL to allow an application to sort items using SortDependents.
SortColumn1Returns information about the currently sorted column.
SortDependentsSorts items.

Split Tree Control

EnterResizeModeAllows the user to resize the panes of a split tree control using the keyboard.
LeftWindowReturns the window handle or object of the tree control in the left pane of a split tree control.
MakeSplitterOptimalPositions the splitter bar optimally, so the left pane can display as much data as possible without a horizontal scroll bar.
RightWindowReturns the window handle or object of the tree control in the right pane of a split tree control.
SplitColumnDefines the number of columns displayed in the left pane of a split tree control.
SplitterOffsetDefines the offset of the splitter bar relative to the left edge of the tree control's client area.
SplitterRectReturns the location of the splitter bar in client area coordinates.
SplitterWidthDefines the width of the splitter bar in a split tree control.

Virtual Mode

LPFNSFTTREE_VGETITEMDefines the type of the virtual data source callback used by SftTree/DLL to retrieve information about one item as it is needed by the tree control.
LPFNSFTTREE_VRELEASEITEMDefines the type of the virtual data source callback called by SftTree/DLL to release information previously returned by the SFTTREE_VGETITEM callback.
MakeContentWindowDefines the specified window as a content window (virtual mode only).
SFTTREE_ITEMUsed by the callback function SFTTREE_VGETITEM to return the requested item information to SftTree/DLL when a virtual data source is used.
SFTTREE_VIRTUALDEFUsed by VirtualInitialize to use the tree control in virtual mode and to define the virtual data source.
VirtualCountDefines the number of items when using a virtual data source.
VirtualInitializeInitializes a tree control for virtual mode and for use with a virtual data source.
VirtualItemChangedNotifies a tree control using a virtual data source that items have been changed.
VirtualUserDataReturns the application defined value last used in the SFTTREE_VIRTUALDEF structure when VirtualInitialize was called.

See Also C/C++ API | Notifications