views:

42

answers:

1

I use a subclass of CRichEditCtrl to provide a CEdit+ type control. One thing I want is to disable drag-drop functionality, which the base class provided by default.

Disabling dropping is easy: ::RevokeDragDrop(m_hWnd);

But I can't see a simple way to disable the control being a drag-source. Is there an easy way?

A: 

Caveat: I'm away from my compiler, so I can't check this.

I can't think of a simple way either, but ...

This is an article about extending a text control to support dragging. http://www.code-magazine.com/article.aspx?quickid=0407031&page=5

Yes, it's the exact opposite of what you want.

But consider that it's about detecting the mouse messages that indicate that you want to initiate a drag action. If your subclass did this, and then just didn't let the CRichEditCtrl get the window message(s) that triggers the drag, the drag wouldn't start.

Might work.

Spike