Using Edit control (as double or float) with validation in Visual C++ -- how to allow entry of decimals (ie: 0.3333, 5.5, etc)

Posted on 2004-04-07
Last Modified: 2013-11-20

How do I do the afore mentioned question?  Right now my app just makes noise at me if I try to enter a 0.333....

Thanks in advance

Question by:nasa
LVL 23

Accepted Solution

chensu earned 50 total points
ID: 10777157
Uncheck the Number checkbox in the Sytles tab of the edit box properties in the resource editor.

Author Comment

ID: 10777369

Expert Comment

ID: 13864660
If you do it that way, it doesn't become strictly numeric anymore because you can then enter letters as well as numbers. How do you restrict what the user is typing... .i.e. how do you allow only numbers and decimals to be entered and exclude letters without having to validate on OK.


Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Shell script to login to remote m/c and execute commands 10 78
substring method in java 1 123
viewing source code from eclipse 13 108
post4 challenge 28 101
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question