Solved

drag&drop into a CButton

Posted on 1998-07-03
1
358 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

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

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: 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…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

948 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

22 Experts available now in Live!

Get 1:1 Help Now