Dragging multiple items in treeview

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 13/01/2006 at 09:32, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.5 
Platform:      
Language(s) :     C++  ;

---------
Hi,

I would like to drag multiple selected items from a treeview, to another item in the treeview.

Currently, I can re-organize the treeview items 1 by 1, but I'm not sure how to make it work with multiple selected items.

I am currently doing it like this

  
    virtual void InsertObject(void *root,void *userdata,void *obj,LONG dragtype,void *dragobject,LONG insertmode, Bool bCopy)  
          {  
               BaseObject *head = (BaseObject* )root;  
               UserData *user = (UserData* )userdata;  
               BaseObject *op = (BaseObject* )obj;  
                 
               switch(dragtype)  
               {  
  
               case MYPLUGIN_ITEM_DRAG:   
                    {  
       
                         BaseObject *dragop = (BaseObject* )dragobject;  
                         dragop->Remove();  
                         dragop->InsertUnder(op);  
                      
  
                         break;  
                    }  
  
               }  
               return ;  

dragobject looks like its always a BaseObject, and not an AtomArray (which I was assuming if I dragged multiple selected items)

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 13/01/2006 at 13:13, xxxxxxxx wrote:

Have you tried checking for DRAGTYPE_ATOMARRAY in the BFM_DRAGRECEIVE message? Since the TreeView is basically an extension of GeUserArea (note that I say 'basically'), this message should be received somewhere (either in the TreeView or in the owning GeDialog).

There is also something else to consider from TreeViewFunctions: GenerateDragArray().

Having not tried any multiple-object drags in a TreeView myself, I'm just offering up some suggestions. :)