WM_LBUTTONDOWN

  • Thread starter Thread starter Dean Redmond
  • Start date Start date
D

Dean Redmond

How do i send the WM_LBUTTONDOWN message.

As you can probably tell, im not that proficiant in c# so the simpler the
answer the better.

I've been google-ing this for hours

any help will be greatly appreciated

Thanks!
 
Hi Dean,

1. Declare a method prototype P/Invoking to the SendMessage API:

[DllImport("user32.dll")]
public static extern void SendMessage(IntPtr hWnd, int Msg, int wParam, int
lParam);

2. Determine the message code from WM_LBUTTONDOWN from the Platform SDK
header files.
For this particular message, its message code is 0x0201.

3. Get the handle of the target form or control from its Handle property
and invoke the method declared in step 1 with the necessary parameters.


Please post further questions on P/Invoke in the
microsoft.public.dotnet.framework.interop newsgroup.
 
Back
Top