Solved

CRichEditView and Drag and Drop

Posted on 1997-03-27
1
347 Views
Last Modified: 2013-11-20
Hello,

I am trying to customise drag and drop operations in my CRichEditView derived object. Problem is, none of the drag and drop message handlers (OnDrop, OnDropFiles etc) get activated when a file is dropped into my application window ie. the drag and drop functions but I cannot control it.

I can control drag and drop operations from a CView derived class but not a CRichEditView derived class. Please enlighten.
0
Comment
Question by:lohcheek
1 Comment
 

Accepted Solution

by:
Grzes earned 100 total points
Comment Utility
1). Write your own class derived from COleDropTarget.
    class CMyOleDropTarget : public COleDropTarget {...};

2). Override following member functions of COleDropTarget class:
  OnDragEnter(...)
  OnDragLeave(...)
  OnDragOver(...)
  OnDrop(...)
    These functions are responsible for drag & drop customization.

3). In your CRichEditView derived class add following member:
  CMyOleDropTarget m_myDropTarget;

4). In your CRichEditView derived class modify OnCreate()
    member function:
  CMyRichEditView::OnCreate(...)
  {
    ...
    m_myDropTarget.Register(this);
    ...
  }

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Handling string inputs in C/Linux 23 167
maxBlock challenge 30 99
only14 challenge 19 63
How to convert MFC::CString to UTF8 wchar_t* 10 92
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now