error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTrunkPage::* )(void)' to 'void (__thiscall CCmdTarget::* )(N

来源:互联网 发布:神舟linux系统重装变小 编辑:程序博客网 时间:2024/05/17 03:30

xp sp3

vs 2005 sp1 英文版

 

错误:error C2440: 'static_cast' : cannot convert from 'void (__thiscall CTrunkPage::* )(void)' to 'void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'
2>        None of the functions with this name in scope match the target type

 

用custom control 自定义类时,向其主窗口发送notify消息时的错误。

解决办法:把出错的函数参数类型都改为(NMHDR * nmhdr,  LRESULT * lresult)即可。

 

参考资料:

Custom Control的使用

http://old.blog.edu.cn/user1/3527/archives/2007/1804664.shtml

error C2440: 'static_cast' LRESULT LRESULT错误

http://hi.baidu.com/wuxiaoming1733/blog/item/6fc3df09e68dcc8ad1581b93.html

原创粉丝点击