Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Can't detect Drag finish

    SDK Help
    0
    24
    15.6k
    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 03/04/2003 at 09:17, xxxxxxxx wrote:

      Oh, just another thing, Samir. Your plug-in "Drag" does work and I could also do that before. What I was trying to do was to only accept the dragged object if the mouse was released inside a specific gadget. If the mouse was moved away, the dragged object would just be ignored (the gadget would keep the old value or become empty, whatever).
      With your code (and mine), as soon as a dragged object enters the gadget, it is accepted.
      That's why I was trying to check BFM_DRAG_FINISHED. But I always get nil as a result. Isn't there a way to make it behave the way I was intending?

      Rui Batista

      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 03/04/2003 at 09:42, xxxxxxxx wrote:

        Works fine for me. Change the code I gave you to this and use obj as final object:
        var obj,temp;
        MyDialog::Message(msg)
        {
         if(msg->GetId() == BFM_DRAGRECEIVE) 
         {
          if(CheckDropArea(DRAG_TEST, msg, TRUE, TRUE))
          {
           temp = GetDragObject(msg);
           SetDragDestination(MOUSE_POINT_HAND);
           SetString(DRAG_TEST, temp->GetName());
           if(msg->GetData(BFM_DRAG_FINISHED))
           { 
              obj= GetDragObject(msg);
              SetString(DRAG_TEST, obj->GetName());
            
           }
           return TRUE;
           
          }
          else SetString(DRAG_TEST, "");
         }
         return super::Message(msg);
        }

        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 09/03/2005 at 08:09, xxxxxxxx wrote:

          It's really to bad, that there never was an answer to the BFM_DRAG_FINISHED.

          This should trigger, when an object is dropped:

            
          if ( msg->GetData( BFM_DRAG_FINISHED ) )  
          {  
          println( "Drag Finished" );  
          }  
          

          It doesn't 😞

          Weird it seems that the SDK 9.1 advice to use this, and it never triggers !?!

          If anybody know the solution to this, please post 🙂

          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 13/03/2005 at 17:07, xxxxxxxx wrote:

            Thanks to a a PM I got from Rui, this is needed to detect a drag finished.

            If a

            CheckDropArea()
            

            returns TRUE, you can use

              
            if ( msg->GetData( BFM_DRAG_FINISHED ) )  
            {  
            // Your code here  
            }  
            

            This should have been mentioned in the C.O.F.F.E.E. SDK.

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