我做事件响应的时候完成后ctrl+F5出现1>d:\my documents\visual studio 2010\projects\wsachat\wsachat\wsachatdlg.cpp(72): error C2440: “static_cast”: 无法从“void (__thiscall CWSAChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
在匹配目标类型的范围内没有具有该名称的函数
d:\my documents\visual studio 2010\projects\wsachat\wsachat\wsachatdlg.cpp(221): error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 从“const char [10]”转换为“const wchar_t *”
with
[
BaseType=wchar_t,
StringTraits=StrTraitMFC_DLL<wchar_t>
]
与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
在匹配目标类型的范围内没有具有该名称的函数
d:\my documents\visual studio 2010\projects\wsachat\wsachat\wsachatdlg.cpp(221): error C2664: “void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)”: 不能将参数 1 从“const char [10]”转换为“const wchar_t *”
with
[
BaseType=wchar_t,
StringTraits=StrTraitMFC_DLL<wchar_t>
]
与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
解决方案 »
- 请问怎么保存视类窗口的图片,在重绘时让它再显示出来
- 钩子问题
- 文件大小的问题???
- 新手求教:在对话框图片显示
- 搜索子字符串
- Debug 和 Release 的老问题
- 如何调用已经写好的exe程序,而且要实时获取exe程序的输出流
- 如何在CAsysncSocket的派生类中添加消息映呀!小弟很穷 只能放0分
- 要查询数据库中某段时间内的数据,如何写SQL语句
- 我新建了一个类CMyStatic,并定义了鼠标双击事件,如何让它响应。
- VS2010 设置出错:fatal error LNK1104: 无法打开文件“msvcprtd.lib”
- VC6.0中写了下面代码,结束需要回车后,按Ctrl+Z,然后按2下回车才能结束!这是为什么?
不是 void xxx(WPARAM wParam, LPARAM lParam);
注意返回值是LRESULT,不要写成void
LRESULT xxx(WPARAM,LPARAM)而不是
void xxx(WPARAM,LPARAM)
return 的返回值根据消息不同而不同
查下msdn关于消息的说明。