L
lqquan34168
Unregistered / Unconfirmed
GUEST, unregistred user!
在Forms的标准单元中有以下的一个过程,请高手们解释下这个过程代码的作用是干什么用的:
procedure TCustomForm.CMAppSysCommand(var Message: TMessage);
type
PWMSysCommand = ^TWMSysCommand;
begin
Message.Result := 0;
if (csDesigning in ComponentState) or (FormStyle = fsMDIChild) or
(Menu = nil) or Menu.AutoMerge then
with PWMSysCommand(Message.lParam)^ do
begin
SendCancelMode(nil);
if SendAppMessage(CM_APPSYSCOMMAND, CmdType, Key) <> 0 then
Message.Result := 1;;
end;
end;
procedure TCustomForm.CMAppSysCommand(var Message: TMessage);
type
PWMSysCommand = ^TWMSysCommand;
begin
Message.Result := 0;
if (csDesigning in ComponentState) or (FormStyle = fsMDIChild) or
(Menu = nil) or Menu.AutoMerge then
with PWMSysCommand(Message.lParam)^ do
begin
SendCancelMode(nil);
if SendAppMessage(CM_APPSYSCOMMAND, CmdType, Key) <> 0 then
Message.Result := 1;;
end;
end;