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
    • Login

    Drag & Drop

    Scheduled Pinned Locked Moved SDK Help
    1 Posts 0 Posters 151 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 13/11/2010 at 00:52, xxxxxxxx wrote:

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

      ---------
      I am able to do a drag&drop into my dialog, however I cannot detect that the mouse was released over my field.
      The BFM_DRAG_FINISHED or the BFM_DRAG_LOST doesn't seem to be correct.

      What is the best way of doing this?
      I am using Cinema 4D 11.5

      oDialog::Message(msg)
      {
        if (msg->GetId() == BFM_DRAGRECEIVE)
        {
            println ("Drag message ontvangen.");
            if (CheckDropArea(DRAGDROP, msg, TRUE, TRUE))
            {
                var string;
                var obj=GetDragObject(msg);
                if (instanceof(obj,BaseObject))
                {
                    string=obj->GetName();
                    SetString (DRAGDROP, string);
                    println ("The mouse is in DRAGDROP and dropped.", string);
                    // The mouse is in drop area.
                }
                else println ("Wrong type was dragged.");
               
                //if (msg->GetData(BFM_DRAG_FINISHED)) println ("Finished."); // does not work???
            } // end mouse is in drop area.

      if (msg->GetData(BFM_DRAG_LOST))  // never seem to get here???
            {
                println ("lost...........");
                // We are no longer the target of the drag operation.
                // Remove or reset any help text/lines.
            }
        } // end if (msg->GetId() == BFM_DRAGRECEIVE)
       
        return super::Message(msg);
       
      } // end Message

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