🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Using GetAsyncKeyState() ?!!

#14348
From: Michel Corbin
Date: Sun, 17 Aug 2003 21:35
27 lines
1939 bytes
Dennis Jones a �crit :
> 
> "Michel Corbin" <corbin.michel@libertysurf.fr> wrote in message
> news:3F3FD5D4.FF6CEAF@libertysurf.fr...
> > Schandler a �crit :
> 
> > GetAsyncKeyState(VK_SHIFT<0) is true if the key has been down since
> > the last call of the function (That is what I've understood)
> 
> You have understood incorrectly.  If the MSB of the value returned is set,
> then the key is down currently.
> 
> From the Win32 help:
> 
> "If the function succeeds, the return value specifies whether the key was
> pressed since the last call to GetAsyncKeyState, and whether the key is
> currently up or down. If the most significant bit is set, the key is down,
> and if the least significant bit is set, the key was pressed after the
> previous call to GetAsyncKeyState."
> 
> It is therefore possible to determine both from a single call.
> 
> - Dennis

Ok, you are right.

michel
Technical Details
Message-ID: <3F3FF523.AB0CDEAA@libertysurf.fr>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f3f3635@newsgroups.borland.com> <3F3FD5D4.FF6CEAF@libertysurf.fr> <3f3fe29d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,64528418f36af68
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-17 14:41:47 PST
Message-ID: <3F3FF523.AB0CDEAA@libertysurf.fr>
Date: Sun, 17 Aug 2003 23:35:31 +0200
From: Michel Corbin <corbin.michel@libertysurf.fr>
X-Mailer: Mozilla 4.7 [fr] (Win95; U)
X-Accept-Language: fr,en,es-ES,it,de-DE,pt
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Using GetAsyncKeyState() ?!!
References: <3f3f3635@newsgroups.borland.com> <3F3FD5D4.FF6CEAF@libertysurf.fr> <3f3fe29d$1@newsgroups.borland.com>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 212.47.231.119
X-Trace: newsgroups.borland.com 1061156168 212.47.231.119 (17 Aug 2003 14:36:08 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail