error C2440: 'static_cast' : cannot convert from 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' to 'void (__thiscall CCmd
2010-10-27 13:58
477 查看
自定义消息的时候
以及实现函数的时候,
发现如下错误
error C2440: 'static_cast' : cannot convert from 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' to 'void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'
情况和 http://topic.csdn.net/u/20090306/22/8bad40f3-fdfc-4ffd-b22b-3e44ec31a799.html 非常类似。
解决办法,改变函数的返回值 ,原来是void ,直接改为LRESULT
此时还会出现另一个问题:
function must return a value
这是因为 LRESULT 要求返回值,
return 1 ;
即可。
。。。。。。。
以及实现函数的时候,
发现如下错误
error C2440: 'static_cast' : cannot convert from 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' to 'void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'
情况和 http://topic.csdn.net/u/20090306/22/8bad40f3-fdfc-4ffd-b22b-3e44ec31a799.html 非常类似。
解决办法,改变函数的返回值 ,原来是void ,直接改为LRESULT
此时还会出现另一个问题:
function must return a value
这是因为 LRESULT 要求返回值,
return 1 ;
即可。
。。。。。。。
相关文章推荐
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' to 'void (__thiscall CCmd
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CChatDlg::* )(WPARAM,LPARAM)' to
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTrunkPage::* )(void)' to 'void (__thiscall CCmdTarget::* )(N
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CChatDlg::* )(WPARAM,LPARAM)' to
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESUL
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESUL
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESU
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESUL
- error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CchatDlg::* )(CPoint)' to 'UI
- error C2440:cannotconvertfrom 'void (__thiscall CMainFrame::*)'to'LRESULT(__thiscall CWnd::*)
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CChatDlg::* )(WPARAM,LPARAM)' to
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTCP服务器程序Dlg::* )(WPARAM,LPARAM)'
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(void)' to 'LRESUL
- error C2440: ’static_cast’ : cannot convert from ‘UINT (__thiscall CStaticLink::* )(CPoint)’ to ‘LRE
- error C2440: ‘static_cast’ : cannot convert from ‘void (__thiscall CSettingStart::* )(BOOL,HANDLE)’
- error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CchatDlg::* )(CPoint)' to 'UI
- error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CCmdTarget::*)(void)'解决
- error C2440 static_cast:cannot convert from void (_thiscall X::*)(WPARAM,LPARAM)to LRESULT(_thiscall
- error C2440: “static_cast”: 无法从“void (__thiscall CChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscal
- error C2440: “static_cast”: 无法从“void (__thiscall CMYQQDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__th