[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

country-specific decimal point

How can I use DDV recognizing the Komma ',' instead of '.' as decimal point, validating the contents of a CEdit as 'double' type?
0
RolandKoehrsen
Asked:
RolandKoehrsen
  • 4
1 Solution
 
RolandKoehrsenAuthor Commented:
Edited text of question
0
 
mikeblasCommented:
Set the locale for your process by calling the setlocale() function in the C Runtime libraries.

B ekiM
0
 
RolandKoehrsenAuthor Commented:
I have read about the 'setlocale' function in the online help but
still don't know where and how to call it.
Could you specify your answer (where? how?), because I am a newbie.

thank you

Roland
0
 
RolandKoehrsenAuthor Commented:
Adjusted points to 60
0
 
RolandKoehrsenAuthor Commented:
Well, I have found out by myself:

I set the socal settings to the Windows settings by calling
setlocale(LC_ALL, "");

I get the decimal point sign for my own converting routines with the following code:

lconv *localconv_ ;
localconv_=localeconv();
Komma = localconv_->decimal_point;

Please anybody tell me if that's a good way to do this.

Roland
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now