错误“static_cast”: 无法从“UINT (...)(CPoint)”转换为“LRESULT (...)(CPoint)
来源:互联网 发布:学穿搭变美的软件 编辑:程序博客网 时间:2024/05/22 17:31
VS2003之后,系统自带的窗口函数或回调函数用LRESULT,自定义的用UINT?
从vc6转移到vs2005 发生下面问题:
BEGIN_MESSAGE_MAP(CTestDlg, CCaptionBtnDlg)
ON_WM_NCHITTEST() //vs2005 检测错误在这里
END_MESSAGE_MAP()
afx_msg UINT OnNcHitTest(CPoint point);
UINT CTestDlg::OnNcHitTest(CPoint point)
{
....
}
编译总是报:错误 2 error C2440: “static_cast”: 无法从“UINT (__thiscall CTestDlg::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
CSDN上的解决办法:
afx_msg UINT OnNcHitTest(CPoint point);
UINT CTestDlg::OnNcHitTest(CPoint point)
=>
afx_msg LRESULT OnNcHitTest(CPoint point); //.h
LRESULT CTestDlg::OnNcHitTest(CPoint point) //.cpp
0 0
- 错误“static_cast”: 无法从“UINT (...)(CPoint)”转换为“LRESULT (...)(CPoint)
- error C2440: “static_cast”: 无法从“UINT (__thiscall CXXX::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
- “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
- error C2440: “static_cast”: 无法从“UINT (__thiscall CMainWindow::* )(CPoint)”转换为“LRESULT (__thiscall CW
- error C2440: “static_cast”: 无法从“UINT (__thiscall CTestDlg::* )(CPoint)”转换为
- error C2440: “static_cast”: 无法从“UINT (__thiscall CTestDlg::* )(CPoint)”转换为
- error C2440: “static_cast”: 无法从“void (__thiscall CXXDlg* )(void)”转换为“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
- CPoint
- CPoint
- 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
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__t
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARA
- error C2440: “static_cast”: 无法从“void (__thiscall CTransparentWnd::* )(WPARAM,LPARAM)”转换为“LRESULT (__
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thisca
- Code 一不小心爱上你-网页平面UI设计学院就业明星张绍娟专题
- char与varchar的区别
- LDO 负载调整率和线性调整率定义 -LOAD REGULATION
- 郑州公交卡A卡可换绿城通 5个网点可办带身份证
- php剪刀石头布练习
- 错误“static_cast”: 无法从“UINT (...)(CPoint)”转换为“LRESULT (...)(CPoint)
- match和exec异同
- 爱情是什么
- hive函数参考手册
- easyUI插件显示中文乱码
- Sqlite分页
- C语言中结构体赋值问题的讨论
- jar包中引入第三方jar时MANIFEST.MF注意事项
- 面向对象介绍