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
Returns drag & drop operation information in a SFTTREE_DRAGINFO structure.
C
LPSFTTREE_DRAGINFO WINAPI SftTree_GetDragInfo(HWND hwndCtl); LPSFTTREE_DRAGINFO WINAPI SftTreeSplit_GetDragInfo(HWND hwndCtl);
C++
LPSFTTREE_DRAGINFO CSftTree::GetDragInfo() const; LPSFTTREE_DRAGINFO CSftTreeSplit::GetDragInfo() const;
hwndCtl
The window handle of the tree control.
The return value is a pointer to a SFTTREE_DRAGINFO structure.
The GetDragInfo function returns drag & drop operation information in a SFTTREE_DRAGINFO structure.
A tree control must be defined using the SFTTREESTYLE_DRAGDROP window style to support drag & drop.
The SFTTREE_DRAGINFO structure returned is only valid if the calling application is currently processing a SFTTREEN_BEGINDRAG, SFTTREEN_DRAGGING, SFTTREEN_ENDDRAG or SFTTREEN_CANCELDRAG notification. When processing multiple notifications, the SFTTREE_DRAGINFO structure has to be retrieved using GetDragInfo every time. The address of the retrieved SFTTREE_DRAGINFO structure cannot be considered valid after processing one notification.
Some fields in the structure may be modified if the application is currently processing a SFTTREEN_BEGINDRAG or SFTTREEN_DRAGGING notification.
/**********************************************************************/
/* Left Tree Control Handling */
/**********************************************************************/
static void DraggingLeft()
{
/* Drag & drop in progress, which was started on the left side tree */
LPSFTTREE_DRAGINFO lpInfo;
lpInfo = SftTree_GetDragInfo(m_hwndLeftTree);
if (lpInfo->hwnd != m_hwndLeftTree) { // The target is another window
// clear old drop target
if (m_hwndLastTarget) {
SftTree_SetDropHighlight(m_hwndLastTarget, -1, FALSE);
SftTree_StopAutoExpandTimer(m_hwndLastTarget);
void CSampleDlg::OnEndDragLeft()
{
/* The user dropped something */
LPSFTTREE_DRAGINFO lpInfo;
int index;
CString str, text;
lpInfo = m_LeftTree.GetDragInfo();
if (lpInfo->hwnd != m_LeftTree.m_hWnd) { // The target is another window
// In this example the "other" control could be the right tree control
if (lpInfo->hwnd == m_RightTree.m_hWnd) { // target is left tree
index = m_RightTree.GetDropHighlight();See Also C/C++ API | Categories | Notifications
