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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Drag and Drop Messages

    SDK Help
    0
    6
    546
    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
      Helper
      last edited by

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

      On 24/07/2003 at 03:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hiya
      I have searched the forum and used the same exact code that I have found, yet it doesn't work.
      the code I looked at says to do this..

          
          
          
          
          oDialog::Message(msg)  
          {  
           if(msg->GetId() == BFM_DRAGRECEIVE)
          
          
          
          
          ..
          
          
          
      

      but console quickly gets filled up with member not found errors on the if statement. It seems the msg doesn't have a GetID() member.
      The COFFEE SDK on the other hand says to do something like this

          
          
          
          
          oDialog::Message(msg)  
          {  
            if (msg->GetData(BFM_DRAG_FINISHED))  
            {  
                  if (CheckDropArea(DRAG_TEST, msg))  
                  {  
                    var obj = GetDragObject(msg);  
                    var result = new(BaseContainer, BFM_DRAGRESULT);  
                    result->SetData(BFM_DRAGRESULT_CURSOR, MOUSE_POINT_HAND);  
                    return result;  
                  }
          
          
          
          
            }  
            return super::Message(msg);  
          }
          
          
          
      

      but that errors on line var result = new(BaseContainer, BFM_DRAGRESULT); with 'Variable or Function expected'
       
      What am i doing wrong? which way is correct?

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

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

        On 24/07/2003 at 06:05, xxxxxxxx wrote:

        Where are you calling this from? I won´t run my code a fourth time here so please do search the forum once again. There is a working code available.
        Best
        Samir

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

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

          On 24/07/2003 at 14:45, xxxxxxxx wrote:

          Thanks, i didnt see your complete drag plugin code on my previous search. Just tried it and it worked. Thanks
          Still don't see what I did wrong though, but i will disect it to work it out

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

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

            On 24/07/2003 at 15:41, xxxxxxxx wrote:

            Still don't see what I did wrong though, but i will disect it to work it out
            Also if it sounds arrogant but that´s a good exercise to get into COFFEE. Without obstacles or problems, it would take longer to learn it than without them.

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

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

              On 25/07/2003 at 11:22, xxxxxxxx wrote:

              And please report your results... 🙂

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

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

                On 25/07/2003 at 16:22, xxxxxxxx wrote:

                I found out what it was. It was a silly amatuer mistake. Wrong case-sensitivity
                My code was

                    
                    
                    
                    
                    oDialog::Message(msg)  
                    {
                    
                    
                    
                    
                      if(msg->GetID() == BFM_DRAGRECEIVE)  
                      {  
                      }
                    
                    
                    
                    
                    }
                    
                    
                    
                

                ->GetID() should have been ->GetId()
                silly me

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