🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Decimal point

#14052
From: Rodolfo Frino
Date: Sun, 07 Sep 2003 12:58
32 lines
1811 bytes
This is probably the easiest way:

__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
   Application->OnMessage = OnMessage;

}


void __fastcall TForm1::OnMessage(tagMSG &Msg, bool &Handled)
{
   if(Msg.message == WM_KEYDOWN || Msg.message == WM_KEYUP)
   {
       if (Msg.wParam == VK_DECIMAL && (GetKeyState(VK_NUMLOCK) & 0x0001))
       {
          Msg.lParam = MAKELPARAM(LOWORD(Msg.lParam),
                                 (HIWORD(Msg.lParam) & 0xFE00) +
                                  MapVirtualKey(Msg.wParam = 188, 0));
       }
   }
}


Rodolfo

"George" <george@nospam.org> wrote in message
news:3f5b0bb5$1@newsgroups.borland.com...
> Is there a way to change the decimal point (.) on the numeric keypad to a
> comma (,) on the application level? I found a post of delphi code but I
was
> unable to translate it:
Technical Details
Message-ID: <3f5b2b82@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f5b0bb5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,4290b421284ec184
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-07 06:01:23 PST
From: "Rodolfo Frino" <rodolfofrino@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f5b0bb5$1@newsgroups.borland.com>
Subject: Re: Decimal point
Date: Sun, 7 Sep 2003 22:58:54 +1000
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 203.206.22.90
Message-ID: <3f5b2b82@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062939522 203.206.22.90 (7 Sep 2003 05:58:42 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail