?
Solved

CRichEditView and Drag and Drop

Posted on 1997-03-27
1
Medium Priority
?
382 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
Grzes earned 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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