Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CM_DIALOGKEY message

254 views
Skip to first unread message

Tan Chin Leong

unread,
May 2, 2002, 8:57:35 PM5/2/02
to
Hi there,

I saw several examples on handling TAB Key press.

Example:

Procedure CMDialogKey(var Message: TCMDialogKey);message CM_DIALOGKEY;

Procedure TForm1.CMDialogKey(var Message: TCMDialogKey);
begin
if CharCode = VK_TAB then begin
{Process the Alt+Tab key here}
Message.result := 1;
exit;
end;
inherited;
end;

May I know what do Message.result := 1 actually do ? Why 1 and NOT 0, 2 or
other number ?

Please help :)

Tan Chin Leong

Kurt Barthelmess (TeamB)

unread,
May 2, 2002, 11:16:04 PM5/2/02
to

It tells Delphi that the message has been handled. If you set Result
to 0, Delphi will continue to try to find some other handler for the
message event.

Good luck.

Kurt

0 new messages