各位好!vc 6.0中设置按钮控件的文字用SetWindowTextA("开始"),但是在vs 2005中不能这样,要用SetWindowTextW或者SetWindowText
我用vs 2005建了个对话框项目:
CButton m_status;
m_status.SetWindowText("停止");
编译出现错误:
error C2664: “CWnd::SetWindowTextW”: 不能将参数 1 从“const char [5]”转换为“LPCTSTR”
请问这个是什么问题?CString str;
str.Format(""%s  %15s:%5d -> %15s:%5d  TTL=%3d  bytes=%4d",protoname,szsourceip, sourceport, szdestip, destport,ittl,bufsize);
也出现错误:
error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 从“const char [45]”转换为“const wchar_t *”char szerror[64];
AfxMessageBox(szerror);
出现错误:
error C2665: “AfxMessageBox”: 2 个重载中没有一个可以转换所有参数类型请问以上问题的原因是什么?我在vc++ 6.0中都通过的