Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ON_WM_MOUSEMOVE in an ActoiveX

Status
Not open for further replies.

porto99

Technical User
Nov 1, 2004
96
GB
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::eek: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.
 
Well, C++ is a case-sensitive language. Usual name for MS onmousemove event handlers is OnMouseMove.
May be it helps...
 
Did check the code:-

void CMyJoyCtrl::OnMouseMove(UINT nFlags, CPoint point)

Writing ActiveX with Visual Studio .Net to so different from VS 6.0 and all the examples is seems are for 6.0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top