Home All Groups Group Topic Archive Search About

WM_LBUTTONDOWN and the lParam parameter

Author
10 Jan 2006 2:27 PM
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...

--
Nick Pateman

---------------------------------------------------------------
Please do not reply directly to me, but the entire newsgroup.
Any views expressed above are my own
Without predjudice

Author
10 Jan 2006 3:03 PM
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


Show quoteHide quote
"Nick" <nospam@nospam.com> wrote in message
news:O6mW7HfFGHA.3532@TK2MSFTNGP14.phx.gbl...
> 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...
>
> --
> Nick Pateman
>
> ---------------------------------------------------------------
> Please do not reply directly to me, but the entire newsgroup.
> Any views expressed above are my own
> Without predjudice
>
Author
10 Jan 2006 3:11 PM
Nick
Cheers Colin, just what I was after... :-)

Nick.

Show quoteHide quote
"Colin Neller" <cnel***@gmail.com> wrote in message
news:ueNsCcfFGHA.1676@TK2MSFTNGP09.phx.gbl...
> 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
>
>
> --
> Colin Neller
> http://www.colinneller.com/blog
>
>
> "Nick" <nospam@nospam.com> wrote in message
> news:O6mW7HfFGHA.3532@TK2MSFTNGP14.phx.gbl...
>> 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...
>>
>> --
>> Nick Pateman
>>
>> ---------------------------------------------------------------
>> Please do not reply directly to me, but the entire newsgroup.
>> Any views expressed above are my own
>> Without predjudice
>>
>
>
Author
10 Jan 2006 3:28 PM
Dragon
Hi Nick,

Try this:

~
lParam = CInt(y) << 16 Or x

~

Show quoteHide quote
"Nick" <nospam@nospam.com> ñîîáùèë/ñîîáùèëà â íîâîñòÿõ ñëåäóþùåå:
news:O6mW7HfFGHA.3532@TK2MSFTNGP14.phx.gbl...
> 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...
>
> --
> Nick Pateman
>
> ---------------------------------------------------------------
> Please do not reply directly to me, but the entire newsgroup.
> Any views expressed above are my own
> Without predjudice
>
>