Udostępnij za pośrednictwem


CTreeCtrl::SelectDropTarget

Wywołanie tej funkcji ponowne wystawianie element w stylu używane do wskazywania docelowy operacji przeciągania i upuszczania.

BOOL SelectDropTarget(
   HTREEITEM hItem 
);

Parametry

  • hItem
    Uchwyt elementu drzewa.

Wartość zwracana

Niezerowa, jeśli kończy się pomyślnie; 0 inaczej.

Przykład

// 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);
}

Wymagania

Nagłówek: afxcmn.h

Zobacz też

Informacje

Klasa CTreeCtrl

Wykres hierarchii

CTreeCtrl::SelectItem

CTreeCtrl::GetDropHilightItem

CTreeCtrl::CreateDragImage