PC Review


Reply
Thread Tools Rate Thread

WM_LBUTTONDOWN and the lParam parameter

 
 
Nick
Guest
Posts: n/a
 
      10th Jan 2006
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


 
Reply With Quote
 
 
 
 
Colin Neller
Guest
Posts: n/a
 
      10th Jan 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Nick
Guest
Posts: n/a
 
      10th Jan 2006
Cheers Colin, just what I was after... :-)

Nick.

"Colin Neller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
Dragon
Guest
Posts: n/a
 
      10th Jan 2006
Hi Nick,

Try this:

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

~

"Nick" <(E-Mail Removed)> сообщил/сообщила в новостях следующее:
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trap WM_LBUTTONDOWN / UP messages on Button Alain Dekker Microsoft C# .NET 1 15th Mar 2011 05:14 PM
What should be the WPARAM and LPARAM Anand Ganesh Microsoft C# .NET 6 20th Feb 2008 01:30 AM
error STOP:0x0000007B (parameter, parameter, parameter, parameter) robert35 Microsoft Access Getting Started 1 15th Dec 2004 04:28 PM
Handling WM_DEVICECHANGE message in C#; how to handle LPARAM? Jason Seeley Microsoft Dot NET Framework Forms 6 8th Mar 2004 09:22 PM
WM_LBUTTONDOWN Dean Redmond Microsoft C# .NET 1 13th Feb 2004 04:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:55 PM.