DRAGANDDROP_FLAG_FORBID
-
I want to create a
MyRoot
object under an object that is not allowed to be dragged by the user (like theRoot
under theCA
object), I setDRAGANDDROP_FLAG_FORBID
to theflag
in theDragAndDrop
struct ofMSG_DRAGANDDROP
, but I can still drag it out of the parent.
This is the code in
Message()
.Bool MyRoot::Message(GeListNode* node, Int32 type, void* data) { if (type == MSG_DRAGANDDROP) { DragAndDrop* dnd = static_cast<DragAndDrop*>(data); if (dnd == nullptr) return false; if (dnd->flags & DRAGANDDROP_FLAG_SOURCE) dnd->flags |= DRAGANDDROP_FLAG_FORBID; } return true; }
-
Hi @AiMiDi,
MSG_DRAGANDROP
will be received when the host receive a drag, I didn't tried but I guess only dialog can react to this message. In you case you will need to set the NBITNBIT_NO_DD
like soop.ChangeNBit(c4d.NBIT_NO_DD, c4d.NBITCONTROL_SET)
.Cheers,
Maxime.