WM_LBUTTONDOWN and the lParam parameter

N

Nick

Hi there,

I'm trying to emulate mouse clicks using WM_LBUTTONDOWN, and
WM_LBUTTONUP respectively. I can't quite remember how I am to create the
lParam from the x and y coordinates, any imput on this would be greatly
appreciated...
 
C

Colin Neller

Dim lParam as Long = MAKELONG(x, y)

Public Shared Function MAKELONG(ByVal low As Integer, ByVal high As Integer)
As Long
Return (low And &HFFFF) Or ((high And &HFFFF) << 16)
End Function
 
N

Nick

Cheers Colin, just what I was after... :)

Nick.

Colin Neller said:
Dim lParam as Long = MAKELONG(x, y)

Public Shared Function MAKELONG(ByVal low As Integer, ByVal high As
Integer) As Long
Return (low And &HFFFF) Or ((high And &HFFFF) << 16)
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top