Solved

CRichEditView and Drag and Drop

Posted on 1997-03-27
1
352 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
ID: 1300701
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WinWaitActive parameters 12 31
Change owner from userA to server Local Administrators 7 59
ShiftLeft challenge 21 78
unix example issues 18 76
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

23 Experts available now in Live!

Get 1:1 Help Now