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 whether a focus rectangle is drawn around the current item when the tree control has the input focus.
C
BOOL WINAPI SftTree_GetShowFocus(HWND hwndCtl); void WINAPI SftTree_SetShowFocus(HWND hwndCtl, BOOL fSet); BOOL WINAPI SftTreeSplit_GetShowFocus(HWND hwndCtl); void WINAPI SftTreeSplit_SetShowFocus(HWND hwndCtl, BOOL fSet);
C++
BOOL CSftTree::GetShowFocus() const; void CSftTree::SetShowFocus(BOOL fSet = TRUE); BOOL CSftTreeSplit::GetShowFocus() const; void CSftTreeSplit::SetShowFocus(BOOL fSet = TRUE);
hwndCtl
The window handle of the tree control.
fSet
Set to TRUE to display the focus rectangle, otherwise set to FALSE.
GetShowFocus returns a value indicating whether a focus rectangle is drawn around the current item when the tree control has the input focus. TRUE is returned if the focus rectangle is drawn, otherwise FALSE is returned.
The GetShowFocus and SetShowFocus functions define whether a focus rectangle is drawn around the current item when the tree control has the input focus.
The focus rectangle is used to indicate to the user which item is the current item (see GetCaretIndex). An application could turn off the focus rectangle to change the display style of the current item by using cell foreground and background colors instead.
m_hwndRightTree = GetDlgItem(hwndDlg, IDC_RIGHTTREE); SftTree_SetTreeLineStyle(m_hwndRightTree, SFTTREE_TREELINE_AUTOMATIC0);/* Dotted or invisible tree lines (incl. level 0) */ SftTree_SetShowButtons(m_hwndRightTree, TRUE);/* Expand/collapse buttons (level 1..n) */ SftTree_SetShowButton0(m_hwndRightTree, TRUE);/* Show expand/collapse buttons (level 0) */ SftTree_SetButtons(m_hwndRightTree, SFTTREE_BUTTON_AUTOMATIC3);/* Automatic button style 3 */ SftTree_SetShowTruncated(m_hwndRightTree, TRUE);/* Show ... if truncated */ SftTree_SetShowFocus(m_hwndRightTree, FALSE);/* Don't show focus rectangle (caret) */ SftTree_SetSelectionStyle(m_hwndRightTree, SFTTREE_SELECTION_CELL1 | SFTTREE_SELECTION_OUTLINE);/* Select first cell only using outline */ SftTree_SetSelectionArea(m_hwndRightTree, SFTTREE_SELECTIONAREA_ALL);/* Selection changes by clicking anywhere on an item */ SftTree_SetFlyby(m_hwndRightTree, TRUE);/* Flyby highlighting */ SftTree_SetScrollTips(m_hwndRightTree, TRUE);/* Show Scrolltips */ SftTree_SetOpenEnded(m_hwndRightTree, TRUE);/* Last column width */ /* Define columns */ {
// DDX_Control(pDX, IDC_RIGHTTREE, m_RightTree); m_RightTree.SetTreeLineStyle(SFTTREE_TREELINE_AUTOMATIC0);/* Dotted or invisible tree lines (incl. level 0) */ m_RightTree.SetShowButtons(TRUE); /* Expand/collapse buttons (level 1..n) */ m_RightTree.SetShowButton0(TRUE); /* Show expand/collapse buttons (level 0) */ m_RightTree.SetButtons(SFTTREE_BUTTON_AUTOMATIC3);/* Automatic button style 3 */ m_RightTree.SetShowTruncated(TRUE); /* Show ... if truncated */ m_RightTree.SetShowFocus(FALSE); /* Don't show focus rectangle (caret) */ m_RightTree.SetSelectionArea(SFTTREE_SELECTIONAREA_ALL);/* Selection changes by clicking anywhere on an item */ m_RightTree.SetSelectionStyle(SFTTREE_SELECTION_CELL1 | SFTTREE_SELECTION_OUTLINE);/* Select first cell only using outline */ m_RightTree.SetFlyby(TRUE); /* Flyby highlighting */ m_RightTree.SetScrollTips(TRUE); /* Show Scrolltips */ m_RightTree.SetOpenEnded(TRUE); /* Last column width */ /* Define columns */ {
See Also C/C++ API | Categories | Notifications