🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Global keyboard hook

#12501
From: Michel Leunen
Date: Tue, 09 Dec 2003 12:13
17 lines
1569 bytes
Fernando wrote:

> How ca I set a global keyboard hook, so that when the user presses a certain
> key combination, my app starts?

Look at SetWindowsHookEx() and related functions.
The following article shows how to install a hook for the mouse but it's 
not different for the keyboard:
http://www.leunen.com/cbuilder/hook.html

Michel
-- 
----------------------------------------
Michel Leunen
mailto:michel@leunen.com
http://www.leunen.com/cbuilder/
----------------------------------------
Technical Details
Message-ID: <3fd5bc73$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsgate.cistron.nl!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <1p2btv409f839b4aegvsbk5c619j55aps3@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,64b33844715e1287
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-09 04:39:19 PST
Date: Tue, 09 Dec 2003 13:13:31 +0100
From: Michel Leunen <mleu@STOPSPAMskynet.be>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Global keyboard hook
References: <1p2btv409f839b4aegvsbk5c619j55aps3@4ax.com>
In-Reply-To: <1p2btv409f839b4aegvsbk5c619j55aps3@4ax.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.240.69.194
Message-ID: <3fd5bc73$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070972019 81.240.69.194 (9 Dec 2003 04:13:39 -0700)
Lines: 18
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsgate.cistron.nl!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail