SftTree/DLL 7.5 Documentation

Drag & Drop

SftTree/DLL supports a drag & drop protocol by sending WM_COMMAND messages to the parent window if the tree control has the appropriate window style SFTTREESTYLE_DRAGDROP defined. This drag & drop mechanism is generally only suitable to implement drag & drop within one tree control. When dragging between different controls, other mechanisms such as OLE drag & drop must be used.

When dragging within the tree control, the drop target will automatically be updated and the data will automatically start scrolling vertically when the mouse cursor moves into the areas marked below. Once the mouse cursor goes beyond those areas, indicating a drag operation outside the tree control, scrolling stops automatically. No application program intervention is required for this to take place. A header or scroll bar is not required. This drag-scrolling support is identical to the drag-scrolling supported by OLE conventions.

If drag & drop support outside of the current tree control is desired, the SFTTREE_DRAGINFO structure can be interrogated to find the current target window of the drag & drop operation.