The C library uses it's own localisation settings and is always initially the generic "C" setting. To apply the same settings as for the current Windows user, call
setlocale(LC_ALL, "");
at program start (e.g. in
InitInstance
for Windows applications or on top of
main
for command line applications; requires inluding of
locale.h).
To set the locale for the C++ library, include
locale (without
.h) and call
std::locale::global(std::locale(""));
That will also set the locale for the C library.
Note also that the
CString
class uses the C library to format strings. So the decimal point set by the above calls is also used when passing floating point numbers to
CString::[Append]Format()
.