您的位置:首页 > 其它

从 CWinThread 派生一个子类:CConnectThread,在CConnectThread中作消息映射的时候遇到问题

2013-01-04 21:40 381 查看
error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CConnectThread::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

消息函数的声明为:

afx_msg LRESULT OnThreadMessage(WPARAM wParam,LPARAM IParam);

定义为:

LRESULT CConnectThread::OnThreadMessage(WPARAM wParam,LPARAM IParam)

{

return 0;

}

消息函数的返回值和参数都是正确的,VS2008 为什么还是报上面的错呢?根据是什么?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐