TWMKey = packed record
Msg: Cardinal;
CharCode: Word;
Unused: Word;
KeyData: Longint;
Result: Longint;
end;
FormShortCut
FOnShortCut
IsShortCut
function TCustomForm.IsShortCut(var Message: TWMKey): Boolean
procedure CMIsShortCut(var Message: TWMKey); message CM_ISSHORTCUT;
procedure TCustomForm.CMIsShortCut(var Message: TWMKey);
begin
if IsShortCut(Message) then
Message.Result := 1
else
Message.Result := 0;
end;
目前不清楚是否会被传递到
function TApplication.IsShortCut(var Message: TWMKey): Boolean;
begin
Result := False;
if Assigned(FOnShortCut) then FOnShortCut(Message, Result);
Result := Result or (MainForm <> nil) and IsWindowEnabled(MainForm.Handle) and
MainForm.IsShortCut(Message)
end;
先留个爪,以后再仔细研究