🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

LoadString fails in Win2k / Win XP

#7496
From: Thorsten Kettner
Date: Tue, 25 Jan 2005 08:13
29 lines
1676 bytes
Hi all,
my program is being used in UK and in Germany. To get a string 
in the appropriate language, I use

  MyAnsiString.LoadString(HInstance, MYRESID);

This works fine in Win NT and Win 98, but in Win XP and Win 2000
I always get the German string.

My resource file contains two string tables:

STRINGTABLE DISCARDABLE
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
BEGIN
MYRESID "Some text in English."
END

STRINGTABLE DISCARDABLE
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
BEGIN
MYRESID "Ein Text in deutsch."
END

I checked GetUserDefaultLangID() and GetUserDefaultLCID(), and
both work correctly under 98, NT, 2000 and XP. (German/Germany
is code 1031, English/Great Britain is 2057).

Any idea what's going wrong?
Technical Details
Message-ID: <41f5ffbc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,26d4ad2d5662e41d,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Sender: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Reply-To: "Thorsten Kettner" <QUESTIONBYthorsten.kettner@otto.de>
Subject: LoadString fails in Win2k / Win XP
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 80.85.196.91     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41f5ffbc$1@newsgroups.borland.com>
Date: 25 Jan 2005 00:13:48 -0800
X-Trace: newsgroups.borland.com 1106640828 207.105.83.66 (25 Jan 2005 00:13:48 -0800)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail