Archived

This topic is now archived and is closed to further replies.

devil

Mouse Button

Recommended Posts

devil    122
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 !

Share this post


Link to post
Share on other sites
Cobra    122
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~

Share this post


Link to post
Share on other sites
zedzeek    528
with windows
go GetAsyncKeyState(VK_LBUTTON)

IRC 0x1000000 is currently pressed
0x0000001 has been pressed

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
SilentSno    122
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

Share this post


Link to post
Share on other sites