方法如下:

CStringW  txt_Res;
double result_val;
result_val = 25.22;
txt_Res.Format(_T("%lf"), result_val); //用的是Format方法
//此时txt_Res值为25.22