Partager via


CTreeCtrl::SelectDropTarget

Call this function to redraw the item in the style used to indicate the target of a drag-and-drop operation.

BOOL SelectDropTarget(
   HTREEITEM hItem 
);

Parameters

  • hItem
    Handle of a tree item.

Return Value

Nonzero if successful; otherwise 0.

Example

// Set the item at the point myPoint as the drop target.
UINT uFlags;
HTREEITEM hItem = m_TreeCtrl.HitTest(myPoint, &uFlags);

if ((hItem != NULL) && (TVHT_ONITEM & uFlags))
{
   m_TreeCtrl.SelectDropTarget(hItem);
   ASSERT(m_TreeCtrl.GetDropHilightItem() == hItem);
}

Requirements

Header: afxcmn.h

See Also

Concepts

CTreeCtrl Class

CTreeCtrl Members

Hierarchy Chart

CTreeCtrl::SelectItem

CTreeCtrl::GetDropHilightItem

CTreeCtrl::CreateDragImage