RichEditView (DragAndDrop) 
Author Message
 RichEditView (DragAndDrop)

Hello All,

I am working with a RichEditView and try to disable DragAndDrop for the
RichEditCtrl.
Since overwritten virtual methode like OnDragEnter, etc. never get
called I have no idea how to disable DragAndDrop.

Markus Baenziger, CH



Mon, 13 Nov 2000 03:00:00 GMT  
 RichEditView (DragAndDrop)

Hello.

Override QueryAcceptData() and DoPaste() funtions.
If you don't accept any type of CLIPBOARD,
drag-drop will be disabled.

Here is a sample code.

HRESULT CMyRichEditView::QueryAcceptData(...)
{
    return S_FALSE;

Quote:
}

If you want to paste only CF_TEXT type, you can do like this.

HRESULT CMyRichEditView::QueryAcceptData(...)
{
    if ( lpcfFormat == CF_TEXT )
        return S_OK;

    return S_FALSE;

Quote:
}

Bye...

Human Computers, Inc.



Tue, 14 Nov 2000 03:00:00 GMT  
 RichEditView (DragAndDrop)

Hello Bruce Lee

Thank you for your help. Returning S_FALSE in QueryAcceptData works to
disable paste and drop.

In the RichEditView I also would like to disable dragging. Otherwise the
text can still be modfied by dragging. How can I disable dragging?

regards
Markus Baenziger



Mon, 27 Nov 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CListViewCtrl and DragAndDrop

2. Richeditview,printing and windows 2000

3. RichEditView Read Only Caret Problem?

4. RichEditView StreamIn Problem?

5. Printing RichEditView

6. How can I Insert OLE Item into RichEditView?

7. Printing in RichEditView

8. About RichEditView

9. Problem with Set Text Format in RichEditView class

10. RichEditView Page Breaks

11. Bitmaps in RichEditView

12. RichEditView (like) functionality

 

 
Powered by phpBB® Forum Software