Solved

CRichEditView and Drag and Drop

Posted on 1997-03-27
1
373 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

729 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