Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

Sel

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);

Parameters

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.

Returns

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.

Comments

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