关于 .SetWindowText(str);

来源:百度知道 编辑:UC知道 时间:2024/05/29 05:47:04
str.Format("%lf",m_CalculateCs);
CString str;
m_CalculateCs.SetWindowText(str);
为什么会提示error C2228: left of '.SetWindowTextA' must have class/struct/union type

请帮帮忙告诉我.SetWindowText具体怎么用??谢谢啦!
我定义的m_CalculateCs是value double型的
其实我是想把输出的double型格式化。
原来输出是1.14253802697491e+022 我想输出成1.14e+022
怎么样可以这样?谢谢!!

m_CalculateCs是什么类型的
肯定是他没有SetWindowText这个方法

CString str;
str.Format("%0.2lf",m_CalculateCs);
::SetWindowText(m_hwnd,str);你要调用这个函数干嘛

m_CaluculateCs的类型不对吧。
你可以能定义的不是control类型。