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

    Drag and drop in GeUserArea

    Cinema 4D SDK
    c++ windows r19
    3
    6
    1.3k
    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.
    • C4DSC
      C4DS
      last edited by

      I have been looking at the documentation and available samples in the SDK (R19) related to drag and drop.
      From that I have managed to implement the detection of items being drag-n-dropped into a user area of my dialog.

      However, I have not been able to provide support for all type of items.
      Material, Objects, etc ... are not an issue. They all are handled via the DRAGTYPE_ATOMARRAY and the GetDragObject(msg, &type, &object) function provides the items via the "object" variable.
      As such I am able to retrieve the names of the items (and other stuff).

      When I am dragging commands (DRAGTYPE_COMMAND), the obtained "object" variable is nullptr.
      So, I can detect that a command was drag-n-dropped, but I cannot detect which one.
      Am I overlooking something, or is there some limitation?

      1 Reply Last reply Reply Quote 0
      • S
        s_bach
        last edited by

        Hello,

        the command ID is stored in the message BaseContainer. It is stored using the ID BFM_DRAG_DATA_NEW.

        You find an example showing how to handle DRAGTYPE_COMMAND in the Drag and Drop section of of the GUI and Interaction Messages Manual.

        best wishes,
        Sebastian

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 2
        • C4DSC
          C4DS
          last edited by C4DS

          Thanks for the info.
          Looking back at the R19 documentation, no examples are provided, while the documention you link to does contain source code samples.
          Thanks for the updated documentation links. Will check it out.

          Edit: works like a charm. Thanks.

          1 Reply Last reply Reply Quote 0
          • S
            s_bach
            last edited by

            Oops, seems like the R19 docs are missing code snippets. Thanks for informing us!

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • a_blockA
              a_block
              last edited by

              The C++ SDK Docs for Cinema 4D R19 SP3 have been updated and are available for download[URL-REMOVED] again. Sorry, for the inconvenience caused.


              [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

              C4DSC 1 Reply Last reply Reply Quote 0
              • C4DSC
                C4DS @a_block
                last edited by

                @a_block Thanks for the update. Much appreciated!

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