Udostępnij za pośrednictwem


CTreeCtrl::SelectItem

Wywołanie tej funkcji, zaznacz element widoku drzewa danej.

BOOL SelectItem(
   HTREEITEM hItem 
);

Parametry

  • hItem
    Uchwyt elementu drzewa.

Wartość zwracana

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

Uwagi

Jeśli hItem jest NULL, a następnie ta funkcja zaznacza żadnego elementu.

Przykład

// Select the item that is at the point myPoint.
UINT uFlags;
HTREEITEM hItem = m_TreeCtrl.HitTest(myPoint, &uFlags);

if ((hItem != NULL) && (TVHT_ONITEM & uFlags))
{
   m_TreeCtrl.SelectItem(hItem);
}

Wymagania

Nagłówek: afxcmn.h

Zobacz też

Informacje

Klasa CTreeCtrl

Wykres hierarchii

CTreeCtrl::Select

CTreeCtrl::GetSelectedItem

CTreeCtrl::SelectDropTarget