🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Relating Registry to Windows Dialogs ...

#6033
From: Darko Miletic
Date: Sun, 12 Jun 2005 02:27
26 lines
1755 bytes
Vladimir Stefanovic wrote:
> Hi,
> 
> One of my applications need speciffic code-page to be set
> in: Control Panel / Regional and Language ... / Advanced
> for propper application functioning...
> 
> I have found that the entry I mentiond is related to the Registry
> entry (XP):
> 
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language\Default
> Name: Default, Type: REG_SZ, Data: [I read this to check if it is valid]
> 
> Is there some function (al)ready to check this without working
> with registry directly?

What you seek is in fact this:

std::string GetSysLanguage(void) {
     char buffer[5] = {};
     int ret = ::GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, 
LOCALE_IDEFAULTLANGUAGE , buffer, 5);
     return std::string(buffer);
}

Darko
Technical Details
Message-ID: <42ab9d82$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42ab4ea6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,28dc13a0fe5cc15e
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 11 Jun 2005 23:27:12 -0300
From: Darko Miletic <kiklop@fibertel.com.ar>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Relating Registry to Windows Dialogs ...
References: <42ab4ea6$1@newsgroups.borland.com>
In-Reply-To: <42ab4ea6$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 201.235.26.105
Message-ID: <42ab9d82$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1118543234 201.235.26.105 (11 Jun 2005 19:27:14 -0700)
Lines: 26
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail