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 attribute of the current drag & drop target item.
C
DWORD WINAPI SftTree_GetDropHighlightStyle(HWND hwndCtl); void WINAPI SftTree_SetDropHighlightStyle(HWND hwndCtl, DWORD style); DWORD WINAPI SftTreeSplit_GetDropHighlightStyle(HWND hwndCtl); void WINAPI SftTreeSplit_SetDropHighlightStyle(HWND hwndCtl, DWORD style);
C++
DWORD CSftTree::GetDropHighlightStyle() const; void CSftTree::SetDropHighlightStyle(DWORD style); DWORD CSftTreeSplit::GetDropHighlightStyle() const; void CSftTreeSplit::SetDropHighlightStyle(DWORD style);
hwndCtl
The window handle of the tree control.
style
A value describing the drop target display method used for the current drag & drop target defined using SetDropHighlight:
SFTTREE_DROPHIGHLIGHT_CARET | The drop target is the current item (GetCaretIndex). The current item is updated by each call to SetDropHighlight. The drop target becomes the new current item. The target item is not selected, so even in a single selection tree control (see SFTTREESTYLE_MULTIPLESEL) index numbers returned by GetCaretIndex and GetCurSel are not identical. |
SFTTREE_DROPHIGHLIGHT_ONTOP | The drag & drop target is highlighted using the color defined by the SFTTREE_COLORS structure member colorDropHighlight (see SetCtlColors). The color is used as background color for the target item. The current item is not updated. |
SFTTREE_DROPHIGHLIGHT_BETWEEN | The drag & drop target is highlighted using a solid line drawn using the color defined by the SFTTREE_COLORS structure member colorDropHighlight (see SetCtlColors). The line is drawn before the target item, interpreting the value returned by GetDropHighlight as the insertion point. |
GetDropHighlightStyle returns a value indicating the current drop target display method.
The GetDropHighlightStyle and SetDropHighlightStyle functions define the display attribute of the current drag & drop target item.
A tree control must be defined using the SFTTREESTYLE_DRAGDROP window style to support drag & drop.
}; SftTree_SetColumnsEx(m_hwndLeftTree, 1, aCol);/* Set column attributes */ } SftTree_SetShowRowHeader(m_hwndLeftTree, SFTTREE_ROWSTYLE_BUTTONCOUNT0);/* Row style */ SftTree_SetRowHeaderStyle(m_hwndLeftTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row header style */ SftTree_SetDragBitmaps(m_hwndLeftTree, TRUE);/* Allow drag & drop from item, label pictures */ SftTree_SetDragType(m_hwndLeftTree, SFTTREE_DRAG_PIXELIMM);/* Select and move by a number of pixels to start drag */ SftTree_SetDropHighlightStyle(m_hwndLeftTree, SFTTREE_DROPHIGHLIGHT_BETWEEN);/* Draw line to represent drop target */ SftTree_SetCharSearchMode(m_hwndLeftTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Change the default colors */ { SFTTREE_COLORS Colors; SftTree_GetCtlColors(m_hwndLeftTree, &Colors);/* Get current color settings */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */
}; m_LeftTree.SetColumns(1, aCol); /* Set column attributes */ } m_LeftTree.SetShowRowHeader(SFTTREE_ROWSTYLE_BUTTONCOUNT0);/* Row style */ m_LeftTree.SetRowHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row header style */ m_LeftTree.SetDragBitmaps(TRUE); /* Allow drag & drop from item, label pictures */ m_LeftTree.SetDragType(SFTTREE_DRAG_PIXELIMM);/* Select and move by a number of pixels to start drag */ m_LeftTree.SetDropHighlightStyle(SFTTREE_DROPHIGHLIGHT_BETWEEN);/* Draw line to represent drop target */ m_LeftTree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Change the default colors */ { SFTTREE_COLORS Colors; m_LeftTree.GetCtlColors(&Colors);/* Get current color settings */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */
See Also C/C++ API | Categories | Notifications