Solved

country-specific decimal point

Posted on 1998-06-09
5
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

695 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