🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: getting keyboard input

#14988
From: Vladimir Afanasyev
Date: Fri, 25 Jul 2003 07:06
17 lines
1695 bytes
"DRE" <dre00x@yahoo.com> wrote:
>Good Day,
>
>I want to capture the keyboard input from the active window(the foreground
>window)
>and I'm not experinced with windows api but from searching I understood that
>I will need to use the "GetWindowText" , "SetForegroundWindow" and
>"SendMessage" functions to perform this task but I still don't know how to
>utilize them, and I seek any example that explains how to use these
>functions and what parameters do I need to pass to them.

As a rule in such case you need to use systemwise keyboard hook.
In this conference some weeks ago Michel Leunen gave 
perfect reference: http://tinyurl.com/g7ty

Vladimir.
Technical Details
Message-ID: <3f20d70a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f1fa75d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,edd18f7092575ea0
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-25 00:09:25 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: getting keyboard input
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 212.82.216.226 212.82.216.226    
X-Forwarded-For: 192.168.0.147
References:  <3f1fa75d@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f20d70a$1@newsgroups.borland.com>
Date: 25 Jul 2003 00:06:50 -0700
X-Trace: newsgroups.borland.com 1059116810 207.105.83.65 (25 Jul 2003 00:06:50 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail