Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drag and drop onto a CRichEditCtrl

Status
Not open for further replies.

dima2

Programmer
Jan 20, 2002
85
LB
hi,
I have a CRicheditCtrl and a CListCtrl on a dialog.
what I'm trying to do is drag an item from a CTreeCtrl placed on another dialog onto either the list or the richedit.

As far as the list is concerned I have overriden the OnDragOver, OnDragEnter and OnDrop functions of COleDropTarget.
I added a CMyOleDropTarget member variable and registerd it.
Thus I was able to drop objects having a clipboard format that I've registered.

However for the CRichEditCtrl I wasn't able to do the same, since the CMyOleDropTarget::Register would always fail for that type of CWnd.

So how do I accomplish that?
enable the dropping of a new registered clipboard format
and capture the drop event,
on a CRichEditCtrl

ps:I would like to keep the default behaviour for text formats,
and the ability to accept dropped files (that i've already implemented using ENM_DROPFILES, and DragAcceptFiles)

any help would be greatly apreciated
thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top