SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the selection status of an item (multiple selection tree only).
C
int WINAPI SftTree_GetSel(HWND hwndCtl, int index); int WINAPI SftTree_SetSel(HWND hwndCtl, int index, BOOL fSelect); int WINAPI SftTreeSplit_GetSel(HWND hwndCtl, int index); int WINAPI SftTreeSplit_SetSel(HWND hwndCtl, int index, BOOL fSelect);
C++
int CSftTree::GetSel(int index) const; int CSftTree::SetSel(int index, BOOL fSelect = TRUE); int CSftTreeSplit::GetSel(int index) const; int CSftTreeSplit::SetSel(int index, BOOL fSelect = TRUE);
hwndCtl
The window handle of the tree control.
index
The zero-based index of the item for which the selection status is to be retrieved or set. Specify -1 to change all tree items to the desired selection status fSelect.
fSelect
Set to TRUE to select the item, FALSE to deselect the item.
GetSel returns a value indicating the current selection status of the specified item, TRUE if the item is selected, FALSE if the item is not selected or -1 if an error occurred.
SetSel returns 0 if the function was successful, otherwise -1 is returned.
The GetSel and SetSel functions define the selection status of an item (multiple selection tree only).
This function applies to multiple selection trees only, and cannot be used with single selection tree controls.
Multiple items can be selected using SelItemRange. To select or deselect an item in a single selection tree control use SetCurSel instead.
GetSelItemsArray is used to retrieve all selected items.
See Also C/C++ API | Categories | Notifications