|
-
February 12th, 2003, 06:57 PM
#1
Numeric input only in Edit box
As I understand it if one has the ES_NUMBER style on an Edit box in the resource file the edit box should only accept digits as input. It looks like this:
CONTROL "", EDIT_LATBOX, "EDIT", ES_LEFT |
ES_NUMBER | WS_CHILD | WS_VISIBLE |
WS_BORDER | WS_GROUP | WS_TABSTOP,
96, 108, 28, 9
Yet I can freely input any text I want into the box and even retrieve it. Is there something wrong with the above resource line?
Thanks for any hints. I don't want to capture keyboard input and filter ASCII 0x30 to 0x39 like in DOS!
-
February 12th, 2003, 11:11 PM
#2
What compiler and what OS ?? Working for me with vc6/7 on 2000
Both CONTROL and EDITTEXT are working with es_number.
Also you can try SetWindowLong() after the dialog is created to
see if that applys the style.
-
February 13th, 2003, 05:07 AM
#3
Don't rely on ES_NUMBER, check input yourself.
ES_NUMBER does not effect clipboard pasting.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|