Do anyone know how to force a editbox to accept ONLY 4 key stroke entry. So that if the user type more letters it will not show up in the edit box....They can type 1234 but not 12345 and if they do it won't do no good...

So the Edit box only has 1234 or 4 other letters in and nothing else

Any ideas

Posted on 2002-01-26 23:23:01 by cmax
I use this with rich edit but I think it works with all edit controls
invoke SendMessage, hEdit, EM_LIMITTEXT, 4, 0
Posted on 2002-01-26 23:27:31 by Quantum
Thanks again Quantum
It should work...
Posted on 2002-01-26 23:31:59 by cmax
One more near related question

I use Icz Drag and Drop to get the name of an executive to be displayed in the static box..


It should look like this once dropped

Posted on 2002-01-27 01:22:27 by cmax
There is a ES_LOWERCASE style that will convert everything typed into and edit control to lower case
Posted on 2002-01-27 05:39:18 by Quantum
It possible that you set up your Windows such that it shows all-caps names as regular capitalized text. So, if that is the case, then you don't see that the file is all caps while the edit control does.
I don't see how that should bother you though.
Check out the Windows setting and see if I'm right.
Go to My Computer, and under either View or Tools, there will be Folder Options. Click it and select the View tab.
Posted on 2002-01-27 09:55:44 by Hel