🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages Started by Chris W Mon, 31 Mar 2003 19:55
Sending Mouse Events
#17247
Author: Chris W
Date: Mon, 31 Mar 2003 19:55
7 lines
1156 bytes
I want to send mouse down and mouse up events to another application.  I
can get the Process ID from win2k's taskmanager.   I want to send them
at regular timed intervals does anyone know how to do this.  I don't
have any kind of API reference.  I am using BCB 5.0

--
Chris W
Re: Sending Mouse Events
#17255
Author: bcb
Date: Tue, 01 Apr 2003 02:34
33 lines
1609 bytes
Hi .

You can use SendMessage to send mouse events. You just need to supply a HWND
(Handle of the Form or Component).

Examples:

Send Click,

SendMessage(SomeHandle, BM_CLICK, 0, 0);

MouseUp
SendMessage(SomeHandle,WM_LBUTTONUP,0,0);

MouseDown
SendMessage(SomeHandle,WM_LBUTTONDOWN,0,0);

Hope this helps!



"Chris W" <chrisw3@cox.net> wrote in message
news:3E889D36.BE470D49@cox.net...
> I want to send mouse down and mouse up events to another application.  I
> can get the Process ID from win2k's taskmanager.   I want to send them
> at regular timed intervals does anyone know how to do this.  I don't
> have any kind of API reference.  I am using BCB 5.0
>
> --
> Chris W
>
>
>
Re: Sending Mouse Events
#17256
Author: Chris W
Date: Tue, 01 Apr 2003 03:33
39 lines
1904 bytes
how do I find out the HWND handle for another application I didn't write and
where can I find a referance for these functions?  I can't find anything in the
CPPBuilder help files.

Chris

bcb wrote:

> Hi .
>
> You can use SendMessage to send mouse events. You just need to supply a HWND
> (Handle of the Form or Component).
>
> Examples:
>
> Send Click,
>
> SendMessage(SomeHandle, BM_CLICK, 0, 0);
>
> MouseUp
> SendMessage(SomeHandle,WM_LBUTTONUP,0,0);
>
> MouseDown
> SendMessage(SomeHandle,WM_LBUTTONDOWN,0,0);
>
> Hope this helps!
>
> "Chris W" <chrisw3@cox.net> wrote in message
> news:3E889D36.BE470D49@cox.net...
> > I want to send mouse down and mouse up events to another application.  I
> > can get the Process ID from win2k's taskmanager.   I want to send them
> > at regular timed intervals does anyone know how to do this.  I don't
> > have any kind of API reference.  I am using BCB 5.0
> >
> > --
> > Chris W
> >
> >
> >
Re: Sending Mouse Events
#17257
Author: Ed Mulroy [TeamB]
Date: Tue, 01 Apr 2003 04:12
25 lines
1838 bytes
SendMessage, BM_CLICK, WM_LBUTTONUP and WM_LBUTTONDOWN are covered in the
help file that came with the compiler, win32.hlp.  If you cannot find that
file then look for it on the compiler's CD or get it from the help updates
page

http://tinyurl.com/2zri
  or, in its long form
http://info.borland.com/techpubs/bcppbuilder/v5/updates/pro.html

You can find the HWND for all top windows with the function EnumWindows.  It
is also covered in that help file.

You can also find their documentation at the MSDN site

http://msdn.microsoft.com/library/default.asp

.  Ed

> Chris W wrote in message
> news:3E890877.84654EDB@cox.net...
>
> how do I find out the HWND handle for another
> application I didn't write and where can I find a
> referance for these functions?  I can't find anything
> in the CPPBuilder help files.
Re: Sending Mouse Events
#17164
Author: bcb
Date: Tue, 08 Apr 2003 04:14
54 lines
2412 bytes
You can also use FindWindow and FindWindowEX to get the HWND if you know the
caption and classname of control. Use Borland's  Winsight32 utilty to get
that info, you should have if you have the Pro. or Ent. edition of BCB.



"Chris W" <chrisw3@cox.net> wrote in message
news:3E890877.84654EDB@cox.net...
> how do I find out the HWND handle for another application I didn't write
and
> where can I find a referance for these functions?  I can't find anything
in the
> CPPBuilder help files.
>
> Chris
>
> bcb wrote:
>
> > Hi .
> >
> > You can use SendMessage to send mouse events. You just need to supply a
HWND
> > (Handle of the Form or Component).
> >
> > Examples:
> >
> > Send Click,
> >
> > SendMessage(SomeHandle, BM_CLICK, 0, 0);
> >
> > MouseUp
> > SendMessage(SomeHandle,WM_LBUTTONUP,0,0);
> >
> > MouseDown
> > SendMessage(SomeHandle,WM_LBUTTONDOWN,0,0);
> >
> > Hope this helps!
> >
> > "Chris W" <chrisw3@cox.net> wrote in message
> > news:3E889D36.BE470D49@cox.net...
> > > I want to send mouse down and mouse up events to another application.
I
> > > can get the Process ID from win2k's taskmanager.   I want to send them
> > > at regular timed intervals does anyone know how to do this.  I don't
> > > have any kind of API reference.  I am using BCB 5.0
> > >
> > > --
> > > Chris W
> > >
> > >
> > >
>
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads