|
This little application was coded to analyze the internal logic of drag and drop. I
wanted to look into clipboard formats and see the raw data flowing when dropping
data into a container.
The easiest way was to develop a
drop target exposing IDropTarget and use this to extract all the calls and
information passed to it. All the interesting code is located within
DropTarget.cpp and DropTarget.h. The rest is just an MFC wrapper to display the
data dumped.
DropTarget focuses on logging all
calls made to its interface. It dumps all the data as an item enters, hovers, drops, or
leaves, the drop target focus.
The only interesting code you will
find in the MFC side is the (un-)registration of the drop target using RegisterDragDrop()/RevokeDragDrop().
|