Hi,
I am using an editbox IDC_PORT and i have set the Number property to TRUE so
that it allows only digits to be entered.It is behaving as expected if i type
something.If i try to enter alphebets it is correctly dispalying
"Unacceptable Character".But if i copy some data from other editbox say
"server" and paste it in
IDC_PORT editbox, it is accepting eventhough the "Number" property is set.
Can anyone help me in this regard.
Thanks in advance.

Re: Strange Problem with Editbox. by r_z_aret

r_z_aret
Fri Feb 29 14:43:36 CST 2008

On Fri, 29 Feb 2008 02:51:01 -0800, Sunil Jois
<SunilJois@discussions.microsoft.com> wrote:

>Hi,
>I am using an editbox IDC_PORT and i have set the Number property to TRUE so
>that it allows only digits to be entered.It is behaving as expected if i type
>something.If i try to enter alphebets it is correctly dispalying
>"Unacceptable Character".But if i copy some data from other editbox say
>"server" and paste it in
>IDC_PORT editbox, it is accepting eventhough the "Number" property is set.
>Can anyone help me in this regard.

You can check the text from the edit box in your own code, to make
sure it all fits your criteria. In C/C++, that could be done with a
loop and isdigit.

If you want floating point numbers, not just integers, you will need
to allow decimal points (or commas in some countries).


>Thanks in advance.

-----------------------------------------
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