Article View: borland.public.cppbuilder.nativeapi
Article #8143Re: Using SetWindowsHookEx() to target specific window control
From: CC
Date: Fri, 19 Nov 2004 03:10
Date: Fri, 19 Nov 2004 03:10
51 lines
2711 bytes
2711 bytes
Hi Remy - Thanks for the info - I almost follow you - I understand the part about the application sending custom msg, and the dll hook function intercepting that message. That would at least tell the dll that the application->control is active to receive messages (edit boxes receiving key messages, etc). Is there anyway for the dll hook function to distinguish which of many controls a particular message is coming from? For example - the edit box I want to record info from could receive a msg, then the user goes to another box, then jumps back to the box I'm interested in, the recording seems to get jumbled up - which box was a particular key stroke message intended for? I know I missing something still - but its a little clearer. Thanks very much, CurtC "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:419cf263$1@newsgroups.borland.com... > > "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:
<419d476c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.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> <419cf263$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: "CC" <nospammer@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <419cdca5$1@newsgroups.borland.com> <419cf263$1@newsgroups.borland.com> Subject: Re: Using SetWindowsHookEx() to target specific window control Date: Thu, 18 Nov 2004 19:10:09 -0800 Lines: 53 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 12.219.156.16 Message-ID: <419d476c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1100826476 12.219.156.16 (18 Nov 2004 17:07:56 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail