// So user cant drag root node
if (GetParentItem(pNMTreeView->itemNew.hItem) == NULL) return ;
// Item user started dragging ...
m_hitemDrag = pNMTreeView->itemNew.hItem;
m_hitemDrop = NULL;
// get the image list for dragging
m_pDragImage = CreateDragImage(m_hitemDrag);
// CreateDragImage() returns NULL if no image list
// associated with the tree view control
if( !m_pDragImage )
return;
if (m_bLDragging)
{
POINT pt = point;
ClientToScreen(&pt);
CImageList::DragMove(pt);
if ((hitem = HitTest(point, &flags)) != NULL)
{
CImageList::DragShowNolock(FALSE);
// Tests if dragged item is over another child !
if ((GetParentItem(hitem) != NULL) && (cursor_no != ::GetCursor()))
{
::SetCursor(cursor_no);
// Dont want last selected target highlighted after mouse
// has moved off of it, do we now ?
SelectDropTarget(NULL);
}
// Is item we're over a root node and not parent root node ?
if ((GetParentItem(hitem) == NULL) && (GetParentItem(m_hitemDrag) != hitem ))
{
if (cursor_arr != ::GetCursor()) ::SetCursor(cursor_arr);
SelectDropTarget(hitem);
}
m_hitemDrop = hitem;
CImageList::DragShowNolock(TRUE);
}
}
else
{
// Set cursor to arrow if not dragged