FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Regional & language options ...
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
Regional & language options ...
Posted: Mon Oct 23, 2006 02:21 PM

Hi !

How to detect from system what settings are for decimal symbol and digit grouping ? Any DLL or registry call ? It's some problem with other programs with that , so I'll be thankfull for any help .

With best regards !

Rimantas U.
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
Re: Regional & language options ...
Posted: Mon Oct 23, 2006 05:15 PM
Rimantas wrote:Hi !

How to detect from system what settings are for decimal symbol and digit grouping ? Any DLL or registry call ? It's some problem with other programs with that , so I'll be thankfull for any help .

With best regards !


Hi , again !

I found solution for that . Sample :

function read_reg()
local uVar
local aRet := {}
local oReg
#define  HKEY_CURRENT_USER       2147483649
oReg := TReg32():New( HKEY_CURRENT_USER, "Control Panel\International" )
uVar := oReg:Get( "sMonDecimalSep", " " )
if uVar # NIL
   aadd( aRet, uVar )
   uVar := oReg:Get( "sMonThousandSep", " " )
   aadd( aRet, uVar )
endif
oReg:Close()
return( aRet )


Works fine . :-)

Regards !
Rimantas U.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Regional & language options ...
Posted: Tue Oct 24, 2006 04:51 PM

Rimantas,

Thanks for posting your solution.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
Regional & language options ...
Posted: Wed Oct 25, 2006 03:58 AM
James Bott wrote:Rimantas,

Thanks for posting your solution.

James


Oh ! I did mistake :-) ! After some test I found that this is correct :

function read_reg()
local aRet := {}
local oReg := TReg32():New( 2147483649, "Control Panel\International" )
aadd( aRet, alltrim( oReg:Get( "sDecimal",  " " ) ) )
aadd( aRet, alltrim( oReg:Get( "sThousand", " " ) ) )
oReg:Close()
return( aRet )


It must be sDecimal & sThousand .

Regards !
Rimantas U.

Continue the discussion