Solved

Basic Mouse Events

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

Industry Leaders: 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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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. …
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 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