显示int
int int_value = 2018; //int_value为需要现实的int值
CString temp_value = _T(""); //temp_value用来处理int值
temp_value.Format(_T("%d"), int_value);//固定格式
AfxMessageBox(temp_value);
显示float
long float float_value = 2018.2018; //float_value为需要现实的float值
CString temp_value = _T(""); //temp_value用来处理float值
temp_value.Format(_T("%f"), float_value);//固定格式
AfxMessageBox(temp_value);