In any
CWnd
based class you can override
CWnd::OnMouseMove in your derived class:
BEGIN_MESSAGE_MAP(CMyClass, CBaseClass)
ON_WM_MOUSEMOVE()
END_MESSAGE_MAP()
void CMyClass::OnMouseMove(UINT nFlags, CPoint point)
{
CBaseClass::OnMouseMove(nFlags, point);
}
If that does not work with the MS Chart Control (I have never used it), you can capture the mouse in your parent window hosting the chart control (see
SetCapture()
at the above
CWnd
link). Note that doing so disables all mouse features of the control.
Anyway, I suggest to use one of the many MFC chart control implementations that can be found in the web instead of this ancient control.