I'm trying to create an Edit Box that only accepts floating point numbers using Visual Studio 2010's Resource Editor. I know that there is a Number property for the edit box which, when set to true, will only allow for numeric input. This works fine for integers, but it does not allow me to enter a floating point number such as 0.1.
Is there any built-in mechanism for this in Visual Studio's Resource Editor? What is the best way to go about this?
Put in a handler for the EN_UPDATE message. In the handler read the text from the control with GetWindowText; if it contains something that isn't valid for a floating point number, strip out the offending character and use SetWindowText to put back the updated string.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.