🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Disable WindowsKeys

#526
From: Przemo
Date: Mon, 28 Jan 2008 01:00
24 lines
1413 bytes
Hi,

I would like to prevent an action from pressing both Windows Keys (it means 
I want to disable these keys). I wrote this code :

void __fastcall TFRM_MAIN::ApplicationEvents1Message(tagMSG &Msg,
      bool &Handled)

{
if (Msg.message == WM_KEYDOWN)
  if (Msg.wParam == VK_LWIN || Msg.wParam == VK_RWIN)
    {
    Handled = true;
    ShowMessage("It works !");
    }
}

However it is usless. The application message is catched, but AFTER the 
event. I see the dialogbox ("It works!"), but I see my windows' START menu 
as well.

What is wrong?

Przemo 
Technical Details
Message-ID: <479d293d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1928d24f452b1b2b,start
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Przemo" <baan@poczta.onet.pl>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Disable WindowsKeys
Date: Mon, 28 Jan 2008 02:00:47 +0100
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 83.4.177.53
Message-ID: <479d293d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1201482045 83.4.177.53 (27 Jan 2008 17:00:45 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail