🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Sending VK_CONTROL/VK_HOME to a TStringGrid

#17160
From: nicolasr
Date: Tue, 08 Apr 2003 00:47
20 lines
1586 bytes
Hi,

I need to select the first cell of a TStringGrid in another application. I
found that pressing CTRL-HOME does this. So I tried to send
VK_CONTROL/VK_HOME to the string grid in the other application but somehow
it looks as if only the HOME key is processed. (Pressing HOME moves the
selection rectangle to the first cell in a row)

Here is the code sequence I have tried (hwnd is the HWND of the
TStringGrid):

SendMessage(hwnd, WM_KEYDOWN, VK_CONTROL, 0);
SendMessage(hwnd, WM_KEYDOWN, VK_HOME, 0);
SendMessage(hwnd, WM_KEYUP, VK_HOME, 0);
SendMessage(hwnd, WM_KEYUP, VK_CONTROL, 0);

Anything wrong with this?

thanks for any idea,
Nick
Technical Details
Message-ID: <3e921bff$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,298cd03bd48ea3ec,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-08 02:43:57 PST
From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Sending VK_CONTROL/VK_HOME to a TStringGrid
Date: Tue, 8 Apr 2003 02:47:20 +0200
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 80.133.163.60
Message-ID: <3e921bff$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1049762815 80.133.163.60 (7 Apr 2003 17:46:55 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail