🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #819

Re: Change locale settings.

#819
From: Asger Joergensen
Date: Fri, 30 Nov 2007 13:10
40 lines
1930 bytes
Hi rogo 
 
 rogo says:
> Problably best to replace any euro commas in the costs values with a dot as 
> their typed then.?

Maybe, if You  can get it to work You can change 
the key value in the keypress but people can paste
and then You would have to do it in the on change 
event and would you then change valuses already
changed back, all kind of troubles..;-)

You set a bool in the app to true if Euro;

and then You just have a function like this when You
asign numbers to and from the editfields.

char* __fastcall SwitchDotsAndCommas(char* Str, bool Euro)
{
   if(! Euro)return Str;

   char *Scr = Str;
   while(*Scr != '\0')
   {
      if(*Scr == ',')*Scr = '.';
         else if(*Scr == '.')*Scr = ',';
      ++Scr;
   }

   return Str;
}
//-------------------------------------------------

Just let the user do what they do and see what they want 
to see.

   
Kind regards
Asger
Technical Details
Message-ID: <MPG.21ba2a2cae9f40cd98992c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <474f4d15$1@newsgroups.borland.com> <e6muk3hrea2645655kttdhk136q7klkacb@4ax.com> <474fc345@newsgroups.borland.com> <MPG.21ba00eef7d3685c98992b@newsgroups.borland.com> <474feb91$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ba27b370fdf528b1
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Asger Joergensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Change locale settings.
Date: Fri, 30 Nov 2007 14:10:21 +0100
Message-ID: <MPG.21ba2a2cae9f40cd98992c@newsgroups.borland.com>
References: <474f4d15$1@newsgroups.borland.com> <e6muk3hrea2645655kttdhk136q7klkacb@4ax.com> <474fc345@newsgroups.borland.com> <MPG.21ba00eef7d3685c98992b@newsgroups.borland.com> <474feb91$1@newsgroups.borland.com>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.201.25
X-Trace: newsgroups.borland.com 1196428217 83.73.201.25 (30 Nov 2007 05:10:17 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail