Solved

country-specific decimal point

Posted on 1998-06-09
5
297 Views
Last Modified: 2013-11-20
How can I use DDV recognizing the Komma ',' instead of '.' as decimal point, validating the contents of a CEdit as 'double' type?
0
Comment
Question by:RolandKoehrsen
  • 4
5 Comments
 

Author Comment

by:RolandKoehrsen
ID: 1317811
Edited text of question
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 60 total points
ID: 1317812
Set the locale for your process by calling the setlocale() function in the C Runtime libraries.

B ekiM
0
 

Author Comment

by:RolandKoehrsen
ID: 1317813
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
 

Author Comment

by:RolandKoehrsen
ID: 1317814
Adjusted points to 60
0
 

Author Comment

by:RolandKoehrsen
ID: 1317815
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 58
windows 10 how make picture as desktop background 2 58
fizzArray2 challenge 1 72
wordappend challenge 8 147
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now