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 display style of selected items when the tree control does not have the input focus.
C
int WINAPI SftTree_GetNoFocusStyle(HWND hwndCtl); void WINAPI SftTree_SetNoFocusStyle(HWND hwndCtl, int NoFocusStyle); int WINAPI SftTreeSplit_GetNoFocusStyle(HWND hwndCtl); void WINAPI SftTreeSplit_SetNoFocusStyle(HWND hwndCtl, int NoFocusStyle);
C++
int CSftTree::GetNoFocusStyle() const; void CSftTree::SetNoFocusStyle(int type); int CSftTreeSplit::GetNoFocusStyle() const; void CSftTreeSplit::SetNoFocusStyle(int type);
hwndCtl
The window handle of the tree control.
NoFocusStyle
A value describing the display style of selected items when the tree control does not have the input focus:
SFTTREE_NOFOCUS_KEEPSEL | The selected items are drawn the same way as for a tree control that has the input focus. If a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE), the colors used are defined using the nofocusOutlineBorder, nofocusInnerBorder, nofocusInnerFill1 and nofocusInnerFill2 members of the SFTTREE_COLORS structure. Otherwise, the colorSelBgNoFocus and colorSelFgNoFocus members are used. If these colors are identical to the colors selectionOutlineBorder, selectionInnerBorder, selectionInnerFill1, selectionInnerFill2 or colorSelBg and colorSelBgNoFocus, the user cannot distinguish between selected items in an active tree control and an inactive control. |
SFTTREE_NOFOCUS_FRAME | The selected items are drawn as items that are not selected, but are framed by a rectangle drawn using the color specified by the colorSelBg member of the SFTTREE_COLORS structure. If a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE), SFTTREE_NOFOCUS_FRAME is identical to SFTTREE_NOFOCUS_KEEPSEL. |
SFTTREE_NOFOCUS_NOTHING | The selected items are drawn as items that are not selected. The user cannot distinguish between selected items and items that are not selected in an inactive tree control. |
GetNoFocusStyle returns a value describing the display style of selected items when the tree control does not have the input focus.
The GetNoFocusStyle and SetNoFocusStyle functions define the display style of selected items when the tree control does not have the input focus.
m_editIndex = index; /* save position */ m_editCol = col; SftTree_SetCurSel(g_hwndTree, index); // <<<< added: selection follows item being edited SftTree_SetCaretIndex(g_hwndTree, index); // <<<< added: selection follows item being edited /* Change selection style to not shown anything */ SftTree_SetNoFocusStyle(g_hwndTree, SFTTREE_NOFOCUS_NOTHING); /* Copy the text found in the tree control */ SftTree_GetTextCol(g_hwndTree, m_editIndex, m_editCol, szBuffer); SftTree_AdjustCellEditRect(g_hwndTree, m_editIndex, m_editCol, &rect); EditParent = SftTree_GetCellEditWindow(g_hwndTree, m_editIndex, m_editCol); // based on font height, get best height for the control used for cell editing
m_editIndex = index; /* save position */ m_editCol = col; m_Tree.SetCurSel(index); // <<<< added: selection follows item being edited m_Tree.SetCaretIndex(index); // <<<< added: selection follows item being edited /* Change selection style to not shown anything */ m_Tree.SetNoFocusStyle(SFTTREE_NOFOCUS_NOTHING); /* Copy the text found in the tree control */ CString str; m_Tree.GetText(m_editIndex, m_editCol, str); m_Tree.AdjustCellEditRect(m_editIndex, m_editCol, &rect); CWnd* pEditParent = m_Tree.GetCellEditWindow(m_editIndex, m_editCol);
See Also C/C++ API | Categories | Notifications