I want to drag and drop tree items in CELayoutEditor's
MainDialog.(items can change it's parent and child freedomly)
First,I found that use event.Allow();
in OnBeginDragTree() funtion will cause crash in
treectrl.cpp :
Code: Select all
case TVN_BEGINRDRAG:
if ( event.IsAllowed() )
{
// normally this is impossible because the m_dragImage is
// deleted once the drag operation is over
wxASSERT_MSG( !m_dragImage, _T("starting to drag once again?") );
m_dragImage = new wxDragImage(*this, event.m_item);
m_dragImage->BeginDrag(wxPoint(0,0), this);
m_dragImage->Show(); //this line
}
break;
Second, when I drop the tree item,
my OnEndDragTree() fuction will never being entered.
Third, how to let the tree item move and follow my mouse?
Could anyone help me to resolve above problems?
Thanks.
ps. I've used Otto Wyss's treelistctrl
but it can't do what I want to do...= =