Article View: borland.public.cppbuilder.nativeapi
Article #17719Re: MapVirtualKey, GetKeyNameText problem
From: Mikael Halvarsson
Date: Mon, 03 Mar 2003 14:25
Date: Mon, 03 Mar 2003 14:25
18 lines
1379 bytes
1379 bytes
Solved the problem for now, by doing:
-- <code> --
dwCode = (MapVirtualKey(dwKeyID, 0) << 16) | (1 << 24);
if (GetKeyNameText(dwCode, buf, size) == 0) {
/* Failed to get name, disable extended flag */
dwCode ^= (1 << 24);
if (GetKeyNameText(dwCode, buf, size) == 0) {
/* Failed */
lstrcpy(buf, "(unknown key)");
}
}
-- </code> --
I thought it could be useful for someone else ...
-mikael
Technical Details
Message-ID:
<3e6365e5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e629053$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,39fa981d9fcadc1a X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-04 11:02:49 PST From: "Mikael Halvarsson" <invalid@mail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e629053$1@newsgroups.borland.com> Subject: Re: MapVirtualKey, GetKeyNameText problem Date: Mon, 3 Mar 2003 15:25:42 +0100 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 193.10.108.139 Message-ID: <3e6365e5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1046701541 193.10.108.139 (3 Mar 2003 06:25:41 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail