Commit fd43a468 authored by Krishna Murthy's avatar Krishna Murthy Committed by Alexandre Julliard

Modified EDIT_WM_Char() to restrict keying in of letters other than

numbers when ES_NUMBER style is set.
parent d2df24b9
......@@ -23,7 +23,6 @@
* TODO:
* - ES_CENTER
* - ES_RIGHT
* - ES_NUMBER (new since win95)
* - ES_OEMCONVERT
* -!ES_AUTOVSCROLL (every multi line control *is* auto vscroll)
* -!ES_AUTOHSCROLL (every single line control *is* auto hscroll)
......@@ -3639,6 +3638,10 @@ static void EDIT_WM_Char(EDITSTATE *es, WCHAR c)
break;
default:
/*If Edit control style is ES_NUMBER allow users to key in only numeric values*/
if( (es->style & ES_NUMBER) && !( c >= '0' && c <= '9') )
break;
if (!(es->style & ES_READONLY) && (c >= ' ') && (c != 127)) {
WCHAR str[2];
str[0] = c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment