I'm not familiar with Microsoft C++, but if you take the input, you can check each character via the isdigit() function and if any aren't integers, you can clear it and tell the user to reenter.
One of the properties of the text-box should say something like password. change the value from false to true. As far as limiting only 4 digits i don't know of a way to limit that. You may just have to let them type what ever they want and then perform a check to see if there is more than 4 digits or not.
Comment