I have been developing my first ActiveX called MyJoy , which will use the Joystick and mouse as pointers. Snips of code in the MyJoyCtrl file is shown below.
BEGIN_MESSAGE_MAP(CMyJoyCtrl, COleControl)
ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
ON_MESSAGE(MM_JOY1MOVE, OnJoy1Move)
ON_WM_MOUSEMOVE()END_MESSAGE_MAP()
END_MESSAGE_MAP()
Now I get the MM_JOY1MOVE messages but not the ON_WM_MOUSEMOVE, have I ommited something?
I have like for the Joystick included the onmousemove handler.
void CMyJoyCtrl:nmousemove(UINT nFlags, CPoint point)
{ x_m_pos = point.x;
y_m_pos = point.y;
if(capture == VARIANT_FALSE) // No Joystick operational
{
x_pos = x_m_pos;
y_pos = y_m_pos;
z_pos = 0;
}
}
Also how do you use the Dialog on the PROPPAGE, i.e. are they avaiable in the CMyJoyCtrl files where all the work is done.
VS 7.1 is rather unclear - Any suggestions please or link to .Net tutorial please.
BEGIN_MESSAGE_MAP(CMyJoyCtrl, COleControl)
ON_OLEVERB(AFX_IDS_VERB_PROPERTIES, OnProperties)
ON_MESSAGE(MM_JOY1MOVE, OnJoy1Move)
ON_WM_MOUSEMOVE()END_MESSAGE_MAP()
END_MESSAGE_MAP()
Now I get the MM_JOY1MOVE messages but not the ON_WM_MOUSEMOVE, have I ommited something?
I have like for the Joystick included the onmousemove handler.
void CMyJoyCtrl:nmousemove(UINT nFlags, CPoint point)
{ x_m_pos = point.x;
y_m_pos = point.y;
if(capture == VARIANT_FALSE) // No Joystick operational
{
x_pos = x_m_pos;
y_pos = y_m_pos;
z_pos = 0;
}
}
Also how do you use the Dialog on the PROPPAGE, i.e. are they avaiable in the CMyJoyCtrl files where all the work is done.
VS 7.1 is rather unclear - Any suggestions please or link to .Net tutorial please.