I'm writing a simple calculation program using C++. I'd like to restrict my textboxes to only except valid hex numbers as input. Is there an easy way to do this? I will post code if necessary but my code is all under the calculation button and I think this needs to be put behind the textbox itself. The default VS 2008 code is all I have there now.