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

时间:2015-05-11 14:44:04   收藏:0   阅读:470

编译错误提示:

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位值。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!