0

I have a parent view (:CView) which hosts several components (: CWnd). Components have a COleDropTarget member which gets registerd during control creation. Up to here, all works fine.

I have then added and registered an COleDropTarget in the parent CView. My hope was to receive OnDragOver messages whenever the child windows refused to deal with the dragged object by returning DROPEFFECT_NONE. But it doesn't work. The parent view gets called only if the child control don't register himself as an oletarget.

What is the proper MFC way to let the dragdrop messages pass through the windows hierarchy?

ekt
  • 129
  • 2
  • 11
  • Did you checked OnDragEnter. This function is called first. – xMRi Jan 31 '19 at 15:03
  • yes I checked all. – ekt Jan 31 '19 at 15:11
  • Try and read the OLE/COM Docs. I suppose that this messages you want don't exist at all. Try to set break points on a lower level in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\src\mfc\oledrop2.cpp. See thios and others. https://learn.microsoft.com/en-us/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragover – xMRi Jan 31 '19 at 15:16
  • I've already read all the docs - also this one https://learn.microsoft.com/en-us/cpp/mfc/drag-and-drop-implementing-a-drop-target?view=vs-2017 no one describes what happens if you return 'DROPEFFECT_NONE'. The constant docs says just "Drop target cannot accept the data" – ekt Jan 31 '19 at 15:30

0 Answers0