Solved

drag&drop into a CButton

Posted on 1998-07-03
1
342 Views
Last Modified: 2013-11-20
I need a CButton derived object (CSoundButton) to handle drag& drop but as I understand it: only a CView derived class has drag&drop events handling functions.

It also seems I can't use multiple inheritance (deriving my CSoundButton from both CButton and CView) because I can only use one CWnd derived class when using multiple inheritance (as explained in TechNote #016).

Is there another way to handle drag&drop from a CButton derived object-class ?
0
Comment
Question by:SergeDePauw
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 200 total points
ID: 1318703
You must create class derived from COleDropTarget. Overrider its virtual function. In your CButton derived class declare a member of COleDropTarget derived class. Override OnCreate message handler in CButton derived class and call COleDropTarget Register method passing this pointer. Now OnFragEnter, OnDragOver, OnDrawLeave and OnDrop will be called in various situations during drag and drop operation.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
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 tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

19 Experts available now in Live!

Get 1:1 Help Now