Solved

drag&drop into a CButton

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 90
Macro to save highlighted rows as a separate file 5 43
centeredAverage challenge 8 164
Work with App store 7 52
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 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