> I am wondering whether Visual Studio 2005 provide some existing technology
> or some resource file which I could utilize? For example, I could define
A Message Compiler could be use for that purpose.
http://msdn2.microsoft.com/en-us/library/aa385633.aspx
cordialy,
Crest
George - 24 Oct 2007 06:19 GMT
Thanks Crest,
Good links!
regards,
George
> > I am wondering whether Visual Studio 2005 provide some existing technology
> > or some resource file which I could utilize? For example, I could define
[quoted text clipped - 6 lines]
>
> Crest
> I want to print out and log localized message according to current locale of
> machine. For example, if I am always use MESSAGE_ERROR macro in my program,
[quoted text clipped - 6 lines]
> values if other locale is set. I do not want to change any source codes if
> necessary. I am developing unmanaged C++ DLL using Visual Studio 2005.
Create a resource file, with string tables.
Then you can load the string using ... LoadString :-)
You can use resources to localize dialogs, menus, icons and bitmaps, a lot of
stuff beyond plain strings.
The best practice is to create resource-only DLLs (or satelite DLLs), one per
language. Then you load the one you need (LoadLibrary) and load the resources
from there.
A good place to start: http://msdn2.microsoft.com/en-us/library/ms776201.aspx
Although it looks like Vista only, some of the stuff also applies to previous
versions, see http://msdn2.microsoft.com/en-us/library/aa365002.aspx

Signature
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
George - 24 Oct 2007 06:20 GMT
Thanks for your comprehensive answer Mihai!
regards,
George
> > I want to print out and log localized message according to current locale
> of
[quoted text clipped - 20 lines]
> Although it looks like Vista only, some of the stuff also applies to previous
> versions, see http://msdn2.microsoft.com/en-us/library/aa365002.aspx