DRAGANDDROP_FLAG_FORBID
-
I want to create a
MyRootobject under an object that is not allowed to be dragged by the user (like theRootunder theCAobject), I setDRAGANDDROP_FLAG_FORBIDto theflagin theDragAndDropstruct 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_DRAGANDROPwill 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_DDlike soop.ChangeNBit(c4d.NBIT_NO_DD, c4d.NBITCONTROL_SET).Cheers,
Maxime.