Advertisement

Mouse Button

Started by January 27, 2001 04:54 PM
3 comments, last by devil 23 years, 9 months ago
How can i include checks for the mouse buttons beeing pressed ? i tried to use the VK_LBUTTON command but this doesn''t work either !
I''m not sure what it is, but I can tell you how to find out if you want. ( well, if you are using MSVC anyway )

Firstly, type in ( anywhere ) "VK_LEFT", and highlight it. Then right click over the highlighted text and click "go to definition of"... this will take you to one of the code .cpp files that has ALL of the key/mousebutton definitions in it..

It should be there somewhere, just search for the word mouse, and find the list of mouse commands.


I would find out for you, but I''m not at home at the moment, so I don''t have my MSVC installed where I am.

Hope this helped.

~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
Advertisement
with windows
go GetAsyncKeyState(VK_LBUTTON)

IRC 0x1000000 is currently pressed
0x0000001 has been pressed

http://members.xoom.com/myBollux
Put this after your case WM_KEYUP in the windows part of your code.

case WM_LBUTTONDOWN:
{
//do left mouse button stuff
return 0;
}

if you want right mouse button add the WM_RBUTTONDOWN
Hope this helps!

Dustin
Thx,
i got it running !

Thx for your help

This topic is closed to new replies.

Advertisement