Re: Handle / detect <Alt> key combinations
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Thu, 29 May 2008 12:51:31 -0400
Jatin wrote:
I have a custom panel component that derives from TCustomPanel. In its implementation, I have message handler for WM_KEYDOWN. The handler just posts the message to the application that hosts the panel in its form.GetKeyState, look it up in the win help.
Two of the key combinations that I am interested in detecting are <Alt><Ctrl>F, and also <Ctrl>F. Here's the handler code;
procedure TAppPanel.WMKeyDown(var Message : TWMKeyDown);
begin
if (hwndApp <> 0) then
PostMessage(hwndApp, Message.Msg, Message.CharCode, Message.KeyData);
end;
The handler just posts the message to the application that handles it.
What happens is that when the <Alt><Ctrl>F combination is pressed, the application (whose handle is hwndApp) only receives <Ctrl>F combination, and processes it. Somehow the <Alt> key combination is never received by it. How can I make sure that it also receives <Alt><Ctrl>F combination as well?
Jatin
using it to look at other interesting keys when an event takes place.
--
"I'd rather have a bottle in front of me than a frontal lobotomy"
"Daily Thought:
SOME PEOPLE ARE LIKE SLINKIES. NOT REALLY GOOD FOR ANYTHING BUT
THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS.
http://webpages.charter.net/jamie_5"
.
- Follow-Ups:
- Re: Handle / detect <Alt> key combinations
- From: Jatin
- Re: Handle / detect <Alt> key combinations
- References:
- Handle / detect <Alt> key combinations
- From: Jatin
- Handle / detect <Alt> key combinations
- Prev by Date: Re: Converting WideChar/WideString to AnsiChar/AnsiString
- Next by Date: Can't find Password property in nmsmtp object in Delphi 5
- Previous by thread: Handle / detect <Alt> key combinations
- Next by thread: Re: Handle / detect <Alt> key combinations
- Index(es):
Relevant Pages
|