mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:13:01 +00:00
Krishna Murthy <Krishna.Murthy@guptaworldwide.com>
Modified EDIT_WM_Char() to restrict keying in of letters other than numbers when ES_NUMBER style is set. svn path=/trunk/; revision=10278
This commit is contained in:
parent
5fd1995681
commit
d7c54ad860
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,6 @@
|
||||||
* TODO:
|
* TODO:
|
||||||
* - ES_CENTER
|
* - ES_CENTER
|
||||||
* - ES_RIGHT
|
* - ES_RIGHT
|
||||||
* - ES_NUMBER (new since win95)
|
|
||||||
* - ES_OEMCONVERT
|
* - ES_OEMCONVERT
|
||||||
* -!ES_AUTOVSCROLL (every multi line control *is* auto vscroll)
|
* -!ES_AUTOVSCROLL (every multi line control *is* auto vscroll)
|
||||||
* -!ES_AUTOHSCROLL (every single line control *is* auto hscroll)
|
* -!ES_AUTOHSCROLL (every single line control *is* auto hscroll)
|
||||||
|
@ -3766,6 +3765,10 @@ static void EDIT_WM_Char(EDITSTATE *es, WCHAR c)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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)) {
|
if (!(es->style & ES_READONLY) && (c >= ' ') && (c != 127)) {
|
||||||
WCHAR str[2];
|
WCHAR str[2];
|
||||||
str[0] = c;
|
str[0] = c;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue