Jump to content
  • Advertisement

Archived

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

oWen

Detecting mouse up w/ DInput

This topic is 6074 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 do I detect that the user hey has clicked the mouse (can do that) and then released it? Thanks, owen

Share this post


Link to post
Share on other sites
Advertisement
Windows messages WM_RBUTTONDOWN will be sent if the button is pushed. And WM_RBUTTONUP will be sent when it is released. I think there is a mesage for a simple click. If there isn''t one then you just have to use WM_RBUTTONUP.

Do note that L should be used if you are talking about the left mouse button. And the LOWORD and HIWORD of lParam wil be the mouse poistion during that click, x and y respectively.

"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post


Link to post
Share on other sites
If you are using buffered input then it will come back with a keyup (sort of like the keyboard) when it is up again. If your not using that, when its not down, its up. So just check it each time for being down and if its not then switch it to being up.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!