I have written a control derived from CWnd and I'm trying to implement drag and drop between two instances of it.
I have tried adding a COleDropTarget derived member variable and calling member.Register(this) in the control's OnCreate handler. For some reason the Register function returns 0 (failure) and the overidden OnDrag functions don't get called!
Any ideas? According to the documentation, I can use a COleDropTarget in a non-CView derived class. Why is failing? What must I do?
Ignore that question - I figured it out - It was the AfxOleInit that was missing.
One more question...
How do you implement the COleDataSource part.
My data will be a text string for now - Max length about 250-500 characters.
I only need CF_TEXT format to start, but I'd like to know how to use my own data format too.