` Get regional settings (Steve Lewis ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Get regional settings
2004-11-12 -- Steve Lewis
 
Look at the Windows API call: GetLocaleInfo. Here is a simple example of its usage: !api calls related to localization MODULE('winapi') GetUserDefaultLCID(),SIGNED,PASCAL GetLocaleInfoA(SIGNED lcid,SIGNED type, *CSTRING ret,SIGNED szret),SIGNED,PASCAL,RAW GetCurrencyFormatA(WORD,ULONG,*CSTRING,*CurrencyInfo,*CSTRING,SIGNED),SIGNED,PASCAL,RAW END GetLocaleCountry PROCEDURE ! Declare Procedure LOCALE_SCOUNTRY EQUATE(6) !localized name of country Locale SIGNED,AUTO SLen SIGNED,AUTO iRtn SIGNED,AUTO lpRtn CSTRING(101),AUTO CODE Locale = GetUserDefaultLCID() lpRtn = '' SLen = GetLocaleInfoA(Locale, LOCALE_SCOUNTRY, lpRtn, 0) iRtn = GetLocaleInfoA(Locale, LOCALE_SCOUNTRY, lpRtn, SLen) RETURN lpRtn


Today is November 21, 2024, 7:54 am
This article has been viewed 35237 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: