As per title really... if I want to temporarily disable drag'n'drop on a dialog with multiple COleDropTarget
objects registered, can I call Revoke()
on each object and then Register()
to re-enable the functionality? Or would I have to destroy and create new COleDropTarget
objects each time? I cannot see any clue in the MSDN documentation either for this class or the related RegisterDragDrop
& RevokeDragDrop
WinAPI functions.
I'll test it, but some assurance it's supposed to be safe to do this repeatedly would be better than "it seems to work".
I don't see why it would be unsafe but this isn't something that's discussed in any documentation so getting an ironclad guarantee is going to be difficult. If you're really worried, why not just make your
IDropTarget::DragEnter
method returnDROPEFFECT_NONE
when you want D&D to be disabled?