CString :: Format制作12,345.00格式 [英] CString::Format to make a 12,345.00 format

查看:106
本文介绍了CString :: Format制作12,345.00格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用类似的东西:

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

将双数12345.000000转换为逗号形式的美元金额格式的逗号,例如:"12,345.00"?

谢谢.

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.

推荐答案

考虑使用API​​ GetNumberFormat(). http://msdn.microsoft.com/en-us/library/ms905250.aspx [ ^ ]
Consider using the API GetNumberFormat(). http://msdn.microsoft.com/en-us/library/ms905250.aspx[^]


这篇关于CString :: Format制作12,345.00格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆