浮点数精确到2位
//浮点数精确到2位
FLOAT width = 2.563;
width = int(width*100+0.5)/100.0f;
=========
//浮点数精确到2位
FLOAT width = 2.5654;
CString strItem=L"";
strItem.Format(L"%.2f",width);
===========
//浮点数精确到3位
//浮点数精确到2位
FLOAT width = 2.5634;
width = int(width*1000+0.5)/1000.0f;