开发者

How do I trap the ENTER key in WM 6.1 using C++

Our barcode scanner application is written in C++ eMbedded V 4.00 and works well on the Motorola MC50 WM5 where the ENTER key is interpreted as an IDOK. We are moving the app to the MC55 with WM6.1 and the ENTER key does not translate to an IDOK. I'm of the impression we will have to programatically trap the key entry (or the value passed on via DataWedge). I have ma开发者_开发问答de several attempts to implement either a HOTKEY or something via an Accelerator Table but have been unable to interpret the Microsoft on-line descriptions. If there is a simpler answer that would be good news. If not, a more specific example than the MS samples would be greatly appreciated. Thanks in advance.


Did you try to see what VK_ virtual key constant is mapped to the key you are trying ? IDOK is commonly used as the ID of dialog response, so there is really no association between IDOK/IDCANCEL/etc and some key.

If you want to 'listen' for ENTER or RETURN you should check VK_ENTER, VK_RETURN as virtual keys.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜