• Advertisement
Sign in to follow this  

WM_LBUTTONDOWN and Interpreting its wParam

This topic is 2559 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

Here:
http://msdn.microsoft.com/en-us/library/ms645607%28v=vs.85%29.aspx

It mentions that the wParam indicates what virtual keys are down. It can be one OR MORE of the values.

So I assume that means it's a bitmask, it looks like it anyway, but how would I extract the information for each key?

Let's say if I wanted to know if MK_CONTROL was down (while others could potentially also be down), what's the best way of doing that?
Should I... take MK_CONTROL, then bitwise AND it with wParam and if the result equals MK_CONTROL then MK_CONTROL is down?
Is there another way?

Share this post


Link to post
Share on other sites
Advertisement
Cool, got it working there too.

One more question though: I know WM_KEYDOWN repeats if a key is held, but does WM_LBUTTONDOWN do the same thing?

The lParam is WM_KEYDOWN lets you know if it was held but I don't see anything like that on MSDN for WM_LBUTTONDOWN so it seems like it doesn't.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement