Solved

Basic Mouse Events

Posted on 2000-04-14
2
1,085 Views
Last Modified: 2013-11-20
I can't seem to find the WM_DRAG message! There is WM_XBUTTONDOWN, WM_XBUTTONUP, WM_DBLCLICK and WM_MOUSEMOVE, but no message for dragging! Do I have to implement it myself, by catching the DOWN and UP events? Same question about "click" message. Do I have to respond to mouse-up as if it were a click?
0
Comment
Question by:Lescha
2 Comments
 
LVL 4

Accepted Solution

by:
inpras earned 30 total points
ID: 2716033
Hi
Yes U have to set a flag on mouse down and reset it on mouse button up and check the flag in mouse move
Hope this helps
inpras
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2716039
> I can't seem to find the WM_DRAG

there isn't one :(

> Do I have to implement it myself

yes

> Do I have to respond to mouse-up as if it were a click

yes

why did you think there would be a WM_DRAG message ?

normally on a WM_xBUTTONDOWN you would do a setcapture and set a flag (bDragging=TRUE or something like that)

and then in WM_MOUSEMOVE messages you would do a check for dragging and perfrom your drag operations

then in WM_xBUTTONUP you would do you end drag and releasecapture

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

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 88
deburging in oracle form 12 89
WinWaitActive parameters 12 31
Problem to open Excel file 15 99
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: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 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