🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #17164

Re: Sending Mouse Events

#17164
From: 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
> > >
> > >
> > >
>
>
>
Technical Details
Message-ID: <3e924cf1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!sn-xit-01!sn-xit-09!sn-xit-08!supernews.com!newsfeed.news2me.com!ken-transit.news.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3E889D36.BE470D49@cox.net> <3e88fafa@newsgroups.borland.com> <3E890877.84654EDB@cox.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,458ff317f58d8d34
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-08 03:13:12 PST
From: "bcb" <noemail@sorry.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3E889D36.BE470D49@cox.net> <3e88fafa@newsgroups.borland.com> <3E890877.84654EDB@cox.net>
Subject: Re: Sending Mouse Events
Date: Tue, 8 Apr 2003 00:14:52 -0400
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 172.168.64.163
Message-ID: <3e924cf1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1049775345 172.168.64.163 (7 Apr 2003 21:15:45 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!sn-xit-01!sn-xit-09!sn-xit-08!supernews.com!newsfeed.news2me.com!ken-transit.news.telstra.net!news.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail