首页 > 编程语言 > 详细

MFC “static_cast”: 无法从“void (__thiscall CChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”

时间:2015-05-11 14:41:10      阅读:1316      评论:0      收藏:0      [点我收藏+]

编译错误提示:

error C2440: “static_cast”: 无法从“void (__thiscall CChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
1>        从基类型到派生类型的强制转换需要 dynamic_cast 或 static_cast

更改定义:
afx_msg void OnRecvData(WPARAM wParam, LPARAM lParam);

afx_msg LRESULT OnRecvData(WPARAM wParam, LPARAM lParam);

编译通过

LRESULT是一个数据类型,
MSDN: 32-bit value returned from a window procedure or callback function
指的是从窗口程序或者回调函数返回的32位值。

MFC “static_cast”: 无法从“void (__thiscall CChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”

原文:http://www.cnblogs.com/crj8812/p/4494399.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!