I get this error when compiling the following source from here:
Error 1 error C2440: ‘static_cast’ :
cannot convert from ‘UINT (__thiscall
CStaticLink::* )(CPoint)’ to ‘LRESULT
(__thiscall CWnd::*
)(CPoint)’ e:\development\tooltips\cqa0311\statlink.cpp 28
The line of code is for the ON_WM_NCHITTEST below
BEGIN_MESSAGE_MAP(CStaticLink, CStatic)
ON_WM_NCHITTEST()
ON_WM_CTLCOLOR_REFLECT()
ON_WM_LBUTTONUP()
ON_WM_SETCURSOR()
END_MESSAGE_MAP()
I am not sure what MFC voodoo I have to do to get this to compile. Am I out of luck? I guess this was built with some different version of MFC? I am using VS2008.
(I want to have tooltips for my menu items as described on that webpage.)
From here:
Now OnNcHitTest should be declared as follows: