Hi,
I want to create edit field that accepts only digits. I added
ES_NUMBER style during creation.
The problem exists concerning Fn key on some HTC and Symbol devices.
So you can't enter digits without pressing Fn key. If you don't press
Fn you hear beep and nothing is put in the edit field.
I tried enabling InputMode functionality it for PPC but it doesn't
work. I tried to test using ImmEscape functions to set Number
InputMode, but again that work fine with SmartPhone but failed in case
of PPC.
The another way to do this would be char mapping but again that will
be different for different device ( e.g on LW "E" maps to "1" and on
Wizard "Q" maps to "1"), then this we have to maintain on device.ini.
I want to put only digits into edit field without pressing Fn key.

Windows Mobile 5/6, VisualStudio 2005

Thanks for help!!!

Re: Only digits in text box by r_z_aret

r_z_aret
Thu Mar 06 14:05:10 CST 2008

On Thu, 6 Mar 2008 07:14:28 -0800 (PST), Skiler
<sklyar.andriy@gmail.com> wrote:

>Hi,
>I want to create edit field that accepts only digits. I added
>ES_NUMBER style during creation.
>The problem exists concerning Fn key on some HTC and Symbol devices.
>So you can't enter digits without pressing Fn key. If you don't press
>Fn you hear beep and nothing is put in the edit field.

So far, this sounds like correct behavior. You've "told" the edit box
to accept only digits, and it refuses to allow anything else.


>I tried enabling InputMode functionality it for PPC but it doesn't
>work. I tried to test using ImmEscape functions to set Number
>InputMode, but again that work fine with SmartPhone but failed in case
>of PPC.

I've never used any IME functions, so I can't help you here. I used
google (http://groups.google.com/advanced_group_search) to look up
immescape
and got 18 hits. I took a quick look and was _not_ encouraged.


>The another way to do this would be char mapping but again that will
>be different for different device ( e.g on LW "E" maps to "1" and on
>Wizard "Q" maps to "1"), then this we have to maintain on device.ini.
>I want to put only digits into edit field without pressing Fn key.

I suggest thinking _very_ carefully about this. Having to press an
extra key is annoying. Having keys change meaning can be confusing.

You could have your app handle WM_CHAR messages for the field, ad
could then translate letters into numbers. That would work
consistently across devices. You can also try translating virtual keys
(e.g., VK_0).


>
>Windows Mobile 5/6, VisualStudio 2005
>
>Thanks for help!!!

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com

Re: Only digits in text box by Rick

Rick
Tue Mar 11 10:57:46 CDT 2008

<r_z_aret@pen_fact.com> wrote in message
news:40i0t31eet7hqt1uqc8n0m3kpal5rihakd@4ax.com...

>>The another way to do this would be char mapping but again that will
>>be different for different device ( e.g on LW "E" maps to "1" and on
>>Wizard "Q" maps to "1"), then this we have to maintain on device.ini.
>>I want to put only digits into edit field without pressing Fn key.

> I suggest thinking _very_ carefully about this. Having to press an
> extra key is annoying. Having keys change meaning can be confusing.

On a phone, you're not having keys change meaning. In fact, I've got a
couple of applications on my BlackJack II that have numeric-only textboxes,
and in them, hitting 'e' for example, enters a 1, so what OP's talking about
is, if not standard, at least semi-normal behavior.



Re: Only digits in text box by Skiler

Skiler
Wed Mar 12 06:52:42 CDT 2008

Thanks a lot!
I''ll try to find some solution.