|
|
|
UpdateCaretExpandCollapse |
Defines whether the current location (caret) is updated when the expand/collapse buttons are used.
C
BOOL WINAPI SftTree_GetUpdateCaretExpandCollapse(HWND hwndCtl); void WINAPI SftTree_SetUpdateCaretExpandCollapse(HWND hwndCtl, BOOL fSet); BOOL WINAPI SftTreeSplit_GetUpdateCaretExpandCollapse(HWND hwndCtl); void WINAPI SftTreeSplit_SetUpdateCaretExpandCollapse(HWND hwndCtl, BOOL fSet);
C++
BOOL CSftTree::GetUpdateCaretExpandCollapse() const; void CSftTree::SetUpdateCaretExpandCollapse(BOOL fSet = TRUE); BOOL CSftTreeSplit::GetUpdateCaretExpandCollapse() const; void CSftTreeSplit::SetUpdateCaretExpandCollapse(BOOL fSet = TRUE);
Parameters
hwndCtl
The window handle of the tree control.
fSet
Set to TRUE to update the current location (caret) when the expand/collapse buttons are used. Otherwise, set to FALSE.
Returns
GetUpdateCaretExpandCollapse returns TRUE if the current location (caret) is updated when the expand/collapse buttons are used. Otherwise, FALSE is returned.
Comments
The GetUpdateCaretExpandCollapse and SetUpdateCaretExpandCollapse functions define whether the current location (caret) is updated when the expand/collapse buttons are used.
The current location (caret) can be retrieved using the GetCaretIndex function. If the current location is not updated when the expand/collapse buttons are used, the GetExpandCollapseIndex returns the index of the item where the expand/collapse button was used.
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