If you want to implement drag and drop make sure you have the folowwing settings enabled:
in project settings (all configurations) go to the C/C++ tab.
choose category = C++ Language
enable the checkbox 'Enable Run-Time Type Information (RTTI).
otherwise your dymanic type casts won’t work…
i’m probably the only one that did not know this, but if you have no experience programming in C++ this tip may come in handy.