Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CRichEditView and Drag and Drop

Posted on 1997-03-27
1
Medium Priority
?
387 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

604 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