Error C2440: 'static_cast': cannot convert from 'UINT (__thiscall CSizingControlBar::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)'
- CSizingControlBar - A Resizable Control Bar
- Thread: VC2005 not happy with what ON_WM_NCHITTEST() returnsshare-icon
- Error C2440: 'static_cast' cannot convert from __thiscall
- ON_WM_NCHITTEST (and other MFC macros) won't compile in whidbey
- error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CImportProjectDlg::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)'
- Issue with conversion from Visual C++ 6.0 to Visual Studio 2012
- Getting a program from Windows XP to Windows 7, MFC vs C# vs C++
- a good reference
- error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CStaticLink::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint) (转)
- error C2440: 'static_cast' 错误的解决方法
- errors pointing to the message map
My fix is: find all defined af_msg handler definition and update return type to : LRESULT.
afx_msg LRESULT CSizingControlBar::OnNcHitTest(CPoint point)
afx_msg LRESULT OnNcHitTest(CPoint point);
It may depend on which version of VC you are using and which version of MSDN.
VS2005 MSDN shows the prototype for WM_NCHITTEST to be:
afx_msg LRESULT OnNcHitTest(
CPoint point
);
very close to answer/fix...
解决方法: 找到 UNIT CStaticLink::OnNcHitTest(CPoint point) 将UNIT 改为LRESULT
问题描述:
在将vc6.0程序转换到vs2005或者vs2008、vs2010时提示:error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CStaticLink::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)
解决方法:
找到 UNIT CStaticLink::OnNcHitTest(CPoint point) 将UNIT 改为LRESULT
No comments:
Post a Comment