Hey, anyone know a windows mouse function?

Started by
7 comments, last by JwayneT 23 years, 2 months ago
You know how windows has GetAsyncKeyState(), I was wondering if it had anything like that for the mouse. You know, a function that took two paramiters by refrence, one for x and one for y. It''s so I don''t have to use DirectInput.
a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};

Why is it called a hot water heater? Isn't it cold when it goes in the tank?

[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]
Advertisement
Off the top of my head, it''s something like GetCursorPos I think.
Gee Brain, what we gonna do tonight?
Do you know the parameters? And a way to check button states?
a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};

Why is it called a hot water heater? Isn't it cold when it goes in the tank?

[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]
GetAsyncKeyState(VK_LBUTTON), and GetAsyncKeyState(VK_RBUTTON) get the states of the left and right mouse buttons, respectively. If it is a 3 button mouse, VK_MBUTTON gets the middle button.

GetCursorPos takes a POINT as a parameter.
for example -

POINT position;
GetCursorPos(position);
//position.x would be the x position
//position.y would be the y position
Look into DirectInput as well; it''s not too hard. If I get it...
Peon
Much Thanx!

a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};

Why is it called a hot water heater? Isn't it cold when it goes in the tank?

[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]
You can always just look at the Windows messages that relate to the mouse:

WM_MOUSEMOVE
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_LBUTTONDBLCLK
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_RBUTTONDBLCLK

Those may not be exactly right (I''m away from home, no MSDN...) but you get the idea. I''m pretty sure there is a message or two for the wheel also, if you wanted to do something with that.

-Ironblayde
 Aeon Software

"Your superior intellect is no match for our puny weapons!"
Good thing they fixed that in Windows 2000.
you /can/ use the spacebar to click the active button... stil funny non-the-less

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement