Hi,
The prototype for the mouse_event api is:
VOID mouse_event(
DWORD dwFlags, // motion and click options
DWORD dx, // horizontal position or change
DWORD dy, // vertical position or change
DWORD dwData, // wheel movement
ULONG_PTR dwExtraInfo // application-defined information
);
For an example, set dwflags to MOUSEEVENTF_LEFTDOWN (2), and the rest to
zero. This simulates a button down. Follow this by the same structure, but
use MOUSEEVENTF_LEFTUP (4).
These variables come from the SDK. You should download it (if yuo did not
already), to understand all this.
Put it in a loop, with a timer interval, and you'll notice that every time
the code executes, a left mouse bu
tton up and down is generated. (test by
hovering over a button)
From the Microsoft Platform SDK : Windows NT/2000/XP: This function has been
superseded. Use SendInput instead.
This function is a lot more complicated. The mouse_event will work for (at
least) the next few operating systems.
Regards,
Wiebe.
"mnewett@blueyonder.co.uk"
wrote in message
news:5065000000050000005EDE0000-1042324653000@exchange.ni.com...
> thanks for reply - I didnt have any problems with G-toolbox. I
> downloaded the demo and was very impressed.
>
> However, I would like to learn more about the WIN32API functions
> myself.
>
> A) I may come across an application where I want to use a function
> that is not covered by G-toolbox, and B) More importantly, I still use
> Labview 4.0 on occassion - there is no support for this with
> G-toolbox.
>
> Its a shame G-toolbox demo does not allow you to see the block diagram
> of the simulate click demo.
>
> I was unclear by your reply whether I should be
using SendInput or
> mouse_event function. Can you offer any more help ?
>
> Regards
>
> Mike