Re: messabebox(...) v afxmessanebox
"Tom Serface" <tom.nospam@camaswood.com> ha scritto nel messaggio
news:D2823AAE-C0B0-44A6-A86B-3AAB98EA95D2@microsoft.com...
That's a clever idea. You could use constants for the English values
(keys) as well
[...]
IDS_WELCOME 1
IDS_COUNTRY 2
[...]
Hi Tom,
the fact is that I prefer reading strings into source code (maybe others
prefer to read integer constants, but I prefer reading strings).
It is just my personal preference, and I'm aware that others also more
qualified than me can have different opinions, but I just consider more
readable in source code having:
DoSomething( GLS("I like Oregon" );
(which by GLS() - Get Localized String - function can be translated in the
exe like e.g. italian string L"Mi piace l'Oregon"), instead of:
DoSomething( IDS_I_LIKE_OREGON )
(and exspecially for longer strings...).
Of course, you are right when you write that a string-keyed mapping is less
efficient than just integer values; however, I think that in most cases the
difference is negligible.
G