Sign in to follow this  
Sean_Seanston

WM_LBUTTONDOWN and Interpreting its wParam

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this