Click here to Skip to main content
15,888,060 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Is there a way to use something like:

CString::Format(_T("%.2f"), dAmount);

To make the double number 12345.000000 into a comma formatted like a dollar amount with commas like: "12,345.00"?

Thanks.
Posted

1 solution

Consider using the API GetNumberFormat(). http://msdn.microsoft.com/en-us/library/ms905250.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900