I'm using some edit controls in a program, and I would like them to just receive numbers 0-9. How can I throw away letters and other characters? Do I have to take care of a windows message?
http://www.masmforum.com/simple/index.php?topic=540.0
vadiu,
Same comment as I made in the thread that Michael has located for you, learn how to write a subclass for the edit control and the rest is easy. Process the WM_CHAR message in the subclass and return ZERO for any keys you don't want. For the 0123456789 that you require, you also need the backspace and the rest you just throw away.
If you have MASM32 there is a tool on the code menu for creating a subclass for controls which takes the hack work out of what you want to do.
vadiu,
Look at Iczelions Tutorial # 20
hth,
farrier
Yep, I've read it. :U Thanks. But now I have another question.
I'm using resources. So, how can I get a control handle given its ID?
Win32sdk
Search for GetDlgItem
Peter.