Solved

drag&drop into a CButton

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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