Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Register
    • Login

    BFM_DRAGRECEIVE, ListView, & Cursor

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 244 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

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

      On 06/03/2005 at 16:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Questions stacking up! ;0)

      For some unknown reason, it is impossible to set the mouse pointer during drag receive operations in my GeDialog's SimpleListView object. Here's the code; what's wrong with it? Is there a different approach for the SimpleListView (that was, perhaps, never illustrated anywhere) :

        
      LONG Message(...)  
      {  
      ...  
           // Drag and Drop  
           else if (id == BFM_DRAGRECEIVE)  
           {  
                Bool dropArea = CheckDropArea(IS_MATLISTVIEW, msg, TRUE, TRUE);  
                SetDragDestination((dropArea)?MOUSE_POINT_HAND:MOUSE_FORBIDDEN);  
                if (dropArea)  
                {  
                     // Material drop  
                     if (msg.GetLong(BFM_DRAG_FINISHED))  
                     {  
                          LONG type = 0;  
                          void *object = NULL;  
        
                          GetDragObject(msg, &type;, &object;);  
                          if (object && (type == DRAGTYPE_ATOMARRAY))  
                          {  
                               AtomArray* array = static_cast<AtomArray*>(object);  
                               Atom *atom;  
                               type = array->GetCount();  
                               for (LONG i = 0; i < type; i++)  
                               {  
                                    if ((atom = array->GetIndex(i)) && atom->IsInstanceOf(Mmaterial))  
                                    {             
                                         Material* mat = static_cast<Material*>(atom);  
                                         /*  
                                         // - Set Item  
                                         BaseContainer data;  
                                         data.SetString('name', "Empty");  
                                         matListView.SetItem(0, data);  
                                         */  
                                         GePrint("Dropped: "+mat->GetName());  
                                    }  
                               }  
                               BaseContainer actionmsg(BFM_ACTION), actionresult;  
                               actionmsg.SetLong(BFM_ACTION_ID, IS_MATLISTVIEW);  
                               GeDialog::Message(actionmsg, actionresult);  
                          }          
                     }  
                }  
           }  
      ...  
      }  
      

      Yes, there is a return GeDialog::Message(...) at the end of the method.

      Thanks and confused.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 06/03/2005 at 22:30, xxxxxxxx wrote:

        No need to bother as I've decided on a different approach using a GetDDescription in the PluginMaterial to collect/update and pass all of the Materials to the dialog's listview. Much cleaner. 🙂

        But if there is an answer, it may help others who encounter a similar situation.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post