Article View: borland.public.cppbuilder.nativeapi
Article #8137Re: Using SetWindowsHookEx() to target specific window control
From: Remy Lebeau (TeamB)
Date: Thu, 18 Nov 2004 19:06
Date: Thu, 18 Nov 2004 19:06
23 lines
1779 bytes
1779 bytes
"CC" <nospammer@aol.com> wrote in message news:419cdca5$1@newsgroups.borland.com... > I would like to monitor the keystrokes in a control in another app. > > I understand the SetWindowHookEx() needs to be in a .dll Yes. > I'm wonding how to make the association between establishing > a hook to another application, and then in that application to > an edit box (for example). Have both your own application and the DLL register a custom message via RegisterWindowMessage(). Then have the DLL set up a message hook as needed. Your application can then call the DLL to load the hook, then use FindWindow() and such to located the desired child window in the other application, and then post the custom message to that control. When the DLL gets the message, it can begin monitoring the child window as needed. Gambit
Technical Details
Message-ID:
<419cf263$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<419cdca5$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a7b5d77d3a61450f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <419cdca5$1@newsgroups.borland.com> Subject: Re: Using SetWindowsHookEx() to target specific window control Date: Thu, 18 Nov 2004 11:06:59 -0800 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <419cf263$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1100804707 68.69.17.41 (18 Nov 2004 11:05:07 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail