“static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
来源:互联网 发布:c语言环境变量设置 编辑:程序博客网 时间:2024/06/06 15:49
error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)” f:\tools\4bands ifx_xmm2130_ft\common\sizecbar.cpp 109
CWnd类,afx_msg LRESULT OnNcHitTest(CPoint point);
而在CSizingControlBar中是afx_msg UINT OnNcHitTest(CPoint point);
只要将这些UINT替换为LRESULT就可以了。
查找OnNcHitTest,将下面两行:
afx_msg UINT OnNcHitTest(CPoint point);//.h
UINT CTestDlg::OnNcHitTest(CPoint point);//.cpp
改为:
afx_msg LRESULT OnNcHitTest(CPoint point);//.h
LRESULT CTestDlg::OnNcHitTest(CPoint point);//.cpp
另外一个小问题:
CString atMyCmd;
atMyCmd+=0x0d;
编译时出现“operator+=不明确”。改正方法:atMyCmd+=(char)0x0d;因为从unsigned int转换到CString和char的等级都是标准转换,所以编译器无法判断到底应该转换到哪一个,所以就导致了这个问题,所以应该强制转换。
【参考资料 感谢作者】
1、error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
- “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
- error C2440: “static_cast”: 无法从“UINT (__thiscall CXXX::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
- error C2440: “static_cast”: 无法从“UINT (__thiscall CMainWindow::* )(CPoint)”转换为“LRESULT (__thiscall CW
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARAM,LPARAM)”
- “static_cast”: 无法从“void (__thiscall CMyNetChatDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARA
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARA
- 2440: “static_cast”: 无法从“void (__thiscall CMainDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd:
- error C2440: “static_cast”: 无法从“void (__thiscall CXXDlg* )(void)”转换为“LRESULT (__thiscall CWnd:的错误
- 错误“static_cast”: 无法从“UINT (...)(CPoint)”转换为“LRESULT (...)(CPoint)
- error C2440: “static_cast”: 无法从“UINT (__thiscall CTestDlg::* )(CPoint)”转换为
- error C2440: “static_cast”: 无法从“UINT (__thiscall CTestDlg::* )(CPoint)”转换为
- 【转】error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARAM,LPARAM)”
- 【VC】无法从"LRESULT (__thiscall CMyWinThread::* )”转换为"LRESULT (__thiscall CWnd::* )
- static_cast” : 无法从“void (__thiscall CMainFrame::* )(NMTOOLBARA *,LRESULT *)”转换为“void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT
- static_cast” : 无法从“void (__thiscall CMainFrame::* )(NMTOOLBARA *,LRESULT *)”转换为“void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT
- 无法从“void (__thiscall CtestDlg::* )(void)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
- 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARAM,LPARAM)”
- VC运行时库(/MD、/MT等)
- ZOJ 1405 Tanning Salon
- OpenCV学习笔记(四十七)——VideoWriter生成视频流highgui
- 如何往excel的表格中导入一张图片
- 利用Servlet读取HTML表单数据-Servlet学习笔记
- “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
- java控制执行流程
- Ubuntu技巧汇总(不断添加)
- VMware安装Gentoo记录
- /九度OJ 教程30 优先队列解决哈夫曼树
- 【算法练习】二叉树方法对数组进行排序
- 天勤OJ 题目1448: 日期累加
- 微软windows图形接口
- php连接函数implode()和分割explode()