Click to See Complete Forum and Search --> : 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 perlwitz@gmx.de
Emil
May 11th, 1999, 07:53 AM
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
emil@ntier.se
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.