|
-
May 11th, 1999, 07:48 AM
#1
Changing the decimal point ??
I'm looking for a possibility to let the user decide if he wants to use the sign ',' as decimal point or the sign '.'. The User should be able to chose one of these signs as decimal point.
If anybody had an idea i'd be very glad to get a response.
Thanks a lot,
Marko
Please mail to [email protected]
-
May 11th, 1999, 07:53 AM
#2
Re: Changing the decimal point ??
That is made in the regional settings in the control panel (at the start-menu).
So the user probably has the decimal sign they prefer...
If you want this to change from your program you either has to change in the registry (and actually changing the regional settings) or you can let all your number edit boxes etc be text and format the output (and checking the input) your self.
But I really can't see why you would like to change the regional settings...
---------------------------------------------
Emil Gustafsson
M.Sc. Computer Science
NTier Solutions AB
[email protected]
-
May 11th, 1999, 10:06 AM
#3
Re: Changing the decimal point ??
If you really do want to do it, try the setlocale function
eg.
#include <locale.h>
CString sText;
setlocale(LC_NUMERIC, "German");
sText.Format("German %f", 12.5);
AfxMessageBox(sText);
// Output is: German 12,5
setlocale(LC_NUMERIC, "English");
sText.Format("English %f", 12.5);
AfxMessageBox(sText);
// Output is: English 12.5
Jeff Nuttall
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|