long double num;CString cstr;string str;cstr.Format(_T("%.4f"),num);如果是MBCS编码:str=(LPCSTR)cstr;如果是UNICODE编码:#include USES_CONVERSION;str=W2CA((LPCWSTR)cstr);