This site is no longer active and is available for archival purposes only. Registration and login is disabled.

About WM_KEYDOWN.


About WM_KEYDOWN.

Postby kornalius » Mar 23, 2004 @ 3:48pm

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
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby jongjungbu » Mar 23, 2004 @ 5:24pm

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
User avatar
jongjungbu
Not JongJongBu
 
Posts: 3112
Joined: Jun 19, 2001 @ 4:22am
Location: USA


Postby Dan East » Mar 23, 2004 @ 5:25pm

It doesn't come as a command, just a WM_KEYDOWN message. The key code is contained in the WPARAM / LPARAM.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby jongjungbu » Mar 23, 2004 @ 5:36pm

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
User avatar
jongjungbu
Not JongJongBu
 
Posts: 3112
Joined: Jun 19, 2001 @ 4:22am
Location: USA


Postby kornalius » Mar 23, 2004 @ 5:49pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby kornalius » Mar 23, 2004 @ 9:18pm

User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum