|
|
|
ExpandCollapseIndex |
Returns the zero-based index of the item to expand/collapse.
C
int WINAPI SftTree_GetExpandCollapseIndex(HWND hwndCtl); int WINAPI SftTreeSplit_GetExpandCollapseIndex(HWND hwndCtl);
C++
int CSftTree::GetExpandCollapseIndex() const; int CSftTreeSplit::GetExpandCollapseIndex() const;
Parameters
hwndCtl
The window handle of the tree control.
Returns
GetExpandCollapseIndex returns the zero-based index of the item to expand/collapse.
Comments
The GetExpandCollapseIndex function returns the zero-based index of the item to expand/collapse.
GetExpandCollapseIndex is used while handling notifications such as SFTTREEN_AUTOEXPANDING, SFTTREEN_LBUTTONDOWN_BUTTON, etc., to determine which item to expand or collapse.
GetExpandCollapseIndex returns the same value as GetCaretIndex (i.e., the current item) unless SetUpdateCaretExpandCollapse(FALSE) was used to initialize the tree control. In this case, GetExpandCollapseIndex returns the index of the item whose expand/collapse button was (double-)clicked.
See Also C/C++ API | Categories | Notifications