Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Basic Mouse Events

Posted on 2000-04-14
2
Medium Priority
?
1,144 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 90 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

885 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