Solved

Basic Mouse Events

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 155
Separate files macro - Errors on larger data set 18 76
How to convert MFC::CString to UTF8 wchar_t* 10 457
mapBully challenge 6 198
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 …
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.
Suggested Courses

734 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