Page 1 of 1

About WM_KEYDOWN.

PostPosted: Mar 23, 2004 @ 3:48pm
by kornalius
Me again,

I am trying to trap a WM_KEYDOWN event from an EDIT control. I know the WM_COMMAND is passed to the control with a WM_KEYDOWN as the event when a key is pressed inside the control, but how can I know which key was pressed?

Regards,
Kornalius

PostPosted: Mar 23, 2004 @ 5:24pm
by jongjungbu
Hmm, well usually in my callback function that checks for WM_COMMAND events is an argument passed that contains the virtual key-code of the key pressed (or let go). At that point, I just need to know the various keycodes or at least what to do with them.


JJB

PostPosted: Mar 23, 2004 @ 5:25pm
by Dan East
It doesn't come as a command, just a WM_KEYDOWN message. The key code is contained in the WPARAM / LPARAM.

Dan East

PostPosted: Mar 23, 2004 @ 5:36pm
by jongjungbu
Oh yeah that's right. Heh, I guess I always have them so close to one another in the callback function, I wasn't remembering clearly.

JJB

PostPosted: Mar 23, 2004 @ 5:49pm
by kornalius

PostPosted: Mar 23, 2004 @ 9:18pm
by kornalius