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

x
?
Solved

drag&drop into a CButton

Posted on 1998-07-03
1
Medium Priority
?
412 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
[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
 
LVL 7

Accepted Solution

by:
galkin earned 600 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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 Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 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