CString decimal format with thousand separator?

evo_x
evo_x used Ask the Experts™
on
how can I format a number into a string with thousand decimal separator?

like 123,123,123 instead of 123123123
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
String.Format("{0:n}", 1234);
 
string.Format("{0:n0}", 9876); // no decimals.

Author

Commented:
that's for .NET framework C#, not MFC/C++
Freelance programmer / Consultant
Commented:
GetNumberFormat

The GetNumberFormat function formats a number string as a number  string customized for a specified locale.

An example is here:
http://www.experts-exchange.com/Programming/System/Windows__Programming/MFC/Q_21591768.html

Author

Commented:
thanks !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial