🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.vcl.components
2 messages
2 total messages Started by Disgrace Tue, 15 Feb 2000 00:00
VK_LEFT not trapped by Keydown
#97
Author: Disgrace
Date: Tue, 15 Feb 2000 00:00
14 lines
1141 bytes
I have a custom control derived from TCustomControl. In this control, I
would like to respond to a user hitting the VK_LEFT VK_RIGHT VK_UP VK_DOWN
keys...

I have overridden the KeyDown event, and that did not trap the keys i was
hoping to trap...

I also tried trapping in its overridden WndProc method... no luck there
either. I was wondering if anyone knew what was going on, and how I can
still receive the WM_KEYDOWN event for VK_LEFT and the others...

Any help is much appreciated. Thanks.

Scott.
Re: VK_LEFT not trapped by Keydown
#99
Author: Disgrace
Date: Wed, 16 Feb 2000 00:00
29 lines
1543 bytes
Is it good style to answer your own pleas?

=)

Anyhow, I figured out the problem. My overridden WndProc should handle the
WM_GETDLGCODE message and set the result to DLGC_WANTARROWS in order for
Windows to NOT remove the message from my message que...

Thanks anyhow! =)

Scott

Disgrace wrote in message ...
>I have a custom control derived from TCustomControl. In this control, I
>would like to respond to a user hitting the VK_LEFT VK_RIGHT VK_UP VK_DOWN
>keys...
>
>I have overridden the KeyDown event, and that did not trap the keys i was
>hoping to trap...
>
>I also tried trapping in its overridden WndProc method... no luck there
>either. I was wondering if anyone knew what was going on, and how I can
>still receive the WM_KEYDOWN event for VK_LEFT and the others...
>
>Any help is much appreciated. Thanks.
>
>Scott.
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads