Solved

Basic Mouse Events

Posted on 2000-04-14
2
1,074 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

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…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 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

15 Experts available now in Live!

Get 1:1 Help Now