Jump to content
  • Advertisement

Archived

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

devil

Mouse Button

This topic is 6384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!