A SftTree/DLL tree control supports single and multiple selection, based on the window style SFTTREESTYLE_MULTIPLESEL used when the tree control is created. As the selection changes, an application receives the SFTTREEN_SELCHANGE notification.
The area where a selection change occurs can be defined using the SetSelectionArea function.
In single selection mode, only one item can be selected (highlighted) at a time. When a new item is selected, the previously selected item is then no longer selected. The current position (or caret location) is automatically selected, except while a drag & drop operation is in progress. The caret location indicates the drop target and the selected item is the source. Drag & drop can cause the caret location to be a deselected item. This behavior can be affected by the SetDropHighlightStyle function.
Depending on the SetSelectionArea setting used, items can be selected using the mouse by clicking anywhere on the item to be selected, from row header (leftmost position), to the right side of the window area. Moving the caret location, using the arrow keys, also automatically selects the item at the caret location.
In multiple selection mode, many items can be selected (highlighted) at the same time. The current position (or caret location) is automatically moved to the new location when clicking anywhere on an item.
Items can be selected using the mouse by clicking anywhere on the area defined by the SetSelectionArea function or by using the arrow keys. The new selection replaces the previous selection. If the Control key is used, the selection is added to previous selections. If the Shift key is used, the entire range of items is selected, from the first selected item to the newly selected item. If the Shift and the Control keys are pressed, a range of items is added to the previous selection(s).
Depending on the SetSelectionArea settings, the Control key (in combination with directional keys) can be used to move the caret location without moving the current selection.
The SetRubberbandSelection function can be used to enable click-drag selection of multiple items using a selection rectangle.