Поделиться через


CTreeCtrl::CreateDragImage

Call this function to create a dragging bitmap for the given item in a tree view control, create an image list for the bitmap, and add the bitmap to the image list.

CImageList* CreateDragImage(
   HTREEITEM hItem 
);

Параметры

  • hItem
    Handle of the tree item to be dragged.

Возвращаемое значение

Pointer to the image list to which the dragging bitmap was added, if successful; otherwise NULL.

Заметки

An application uses the image-list functions to display the image when the item is being dragged.

The CImageList object is permanent, and you must delete it when finished. For example:

HTREEITEM hItem =m_TreeCtrl.GetSelectedItem();

CImageList* pImageList = m_TreeCtrl.CreateDragImage(hItem);

// Do something with the image list.

delete pImageList;

Требования

Header: afxcmn.h

См. также

Основные понятия

CTreeCtrl Class

CTreeCtrl Members

Hierarchy Chart

CTreeCtrl::SelectDropTarget

CTreeCtrl::GetDropHilightItem

CTreeCtrl::SetImageList