Detecting whether a mouse button is held down 
Author Message
 Detecting whether a mouse button is held down

Hi,

Does anyone know of an API call that can detect whether or not (and
ideally which) mouse buttons are down?

The reason I ask is because I'd like to check this but some of the
objects I'm using don't support the mousedown (or mousekey, whatever its
called) event.

Thanks

Rich

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Tue, 25 Feb 2003 20:50:34 GMT  
 Detecting whether a mouse button is held down


?Does anyone know of an API call that can detect whether or not (and
?ideally which) mouse buttons are down?

GetAsyncKeyState should do it using:

  VK_LBUTTON = 1
  VK_MBUTTON = 4
  VK_RBUTTON = 2

You might also need

  GetSystemMetrics(SM_SWAPBUTTON)

to see if the buttons have been swapped.

--
Paul Marshall



Tue, 25 Feb 2003 23:36:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Event for holding left mouse button down???

2. Mouse-clicking a button on the toolbar whilst holding down the Shift key

3. Populate A Form While Mouse Is Held Down?

4. ListView: holding button down on an item hogs CPU

5. Click and hold a mouse button on a title bar ( 95 )

6. Scroll Bars - detect mouse up & down

7. global mouse down detect?

8. FYI: Mouse-click on inactive button may drill down

9. Mouse Down event on command buttons

10. Detrecting if mouse button is down

11. Is mouse button down?

12. Button that repeat function when mouse down and holt it

 

 
Powered by phpBB® Forum Software