views:

255

answers:

1

Hi,

I would like to tie an action to a PocketPC button (biggest button at the center - don't know how it is called). I tried to tie the action to WM_GETTEXT message, but this message is sent on every key press and don't know how to add an action just to the specific button. Does anyone know how this could be done?

Thanks!

+2  A: 

Are you talking about the Action button in the middle of a "d-pad"? Each device has its own hardware layout; there's no such thing as the "biggest button at the center" common to all devices. Prehaps you can post a picture?

Anyway, take a look at this page: Keys and Key Codes for Windows Mobile.

Also, WM_GETTEXT is definitely not the message you want to process. Its purpose is to retrieve "window text" of a window (caption of a button, contents of an edit control etc).

You should handle WM_KEYDOWN/WM_KEYUP or WM_CHAR. Also, you may want to look at Accelerators.

atzz
It's typically mapped to the "return" virtual key.
ctacke