tags:

views:

109

answers:

1

I know that ES_NUMBER exists to limit CreateWindowEx to numeric input only, is there a similar mechanism for limiting it to only alphanumeric (a-z,0-9) input? Or another way to do something similar. I know I can check after the fact, but I would like to limit it as the user types.

Thanks.

+3  A: 

Check the EN_UPDATE message (via WM_COMMAND). It is sent just before the screen is updated; you can check the contents of the control and modify them if they contain any characters you don't want.

Head Geek