🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: global hotkey?

#214
From: Sean Farrow
Date: Mon, 07 Jul 2008 07:46
23 lines
1858 bytes
Hi:
To SEt a global Hotkey use the RegisterHotKey function declared in 
windows.h.
This unction take the hwnd to the indows to recieve the wm_hotkey message, 
the unique id o the hotkey you registering (see note later regarding dlls), 
any modifiers you with to use and the virtual key code of the key you wish 
to register.
If your using a shared dll, you need to use GlobalAddAtom and save the 
returned value somewhere as aposed to choosingyour own id. This is to do 
with the ranges of values hotkeys from dlls can take.
To unregister a hotkey youuse UnRegisterHotKey again declared in windows.h.
You also need to handle the wm-hotkey message in the window the hotkey 
pertanes to.
The following will give you more info:
REgisterHotKey:
www.msdn.microsoft.com/en-us/library/ms646309.aspx"
hth
Sean.

Carl Danley" <cdanley@codebyter.com> wrote in message 
news:486fdb54@newsgroups.borland.com...
> is there an API call for a global hotkey? if so, how do I go about setting 
> this up? 
Technical Details
Message-ID: <4871c9d2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <486fdb54@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,19e6d61b58abdd06
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Sean Farrow" <sean.farrow@seanfarrow.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <486fdb54@newsgroups.borland.com>
Subject: Re: global hotkey?
Date: Mon, 7 Jul 2008 08:46:26 +0100
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 88.97.13.95
Message-ID: <4871c9d2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1215416786 88.97.13.95 (7 Jul 2008 00:46:26 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail