新手的几个粗浅有关问题。

新手的几个粗浅问题。。。
学习delphi中又遇到了新问题,有几个地方看不明白呢:

TMyMsg=record;
  msg : cardinal;
  msgtext: shotstring;
end;
......

procedure  TMsgAccepter.Defaulthandler(var message);
begin
 showmessage(TMyMsg(message).Msgtext);

end;

这个参数 var message 是什么意思呢?我看到message 是加粗显示的,它是个什么东东呢??

TMyMsg(message).Msgtext    还有这里记录类型 TMyMsg带上参数是什么意思呢?message能够传递给TMyMsg吗?这一步实现了些什么呢。。。

------解决思路----------------------
这个参数 var message 是什么意思呢
 Delphi Language Reference
Untyped parameters

Topic Groups See Also
You can omit type specifications when declaring var, const, and out parameters. (Value parameters must be typed.) For example,

procedure TakeAnything(const C);

declares a procedure called TakeAnything that accepts a parameter of any type. When you call such a routine, you cannot pass it a numeral or untyped numeric constant.

Within a procedure or function body, untyped parameters are incompatible with every type. To operate on an untyped parameter, you must cast it. In general, the compiler cannot verify that operations on untyped parameters are valid.

message 是加粗显示的,它是个什么东东呢
因为存在消息方法这个概念:
A message method is created by including the message directive in a method declaration, followed by an integer constant between 1 and 49151 which specifies the message ID. 
For example, on Windows:

type
  TTextBox = class(TCustomControl)
  private
    procedure WMChar(var Message: TWMChar); message WM_CHAR;
    ...
  end;

TMyMsg(message).Msgtext    还有这里记录类型 TMyMsg带上参数是什么意思呢?message能够传递给TMyMsg吗?这一步实现了些什么呢。。。
To operate on an untyped parameter, you must cast it. 这里就是强制转换成TMyMsg类型

------解决思路----------------------
1、TMyMsg(message)
将message,强制转换TMyMsg类型;

2、TMyMsg(message).Msgtext
message  强制转换TMyMsg类型的Msgtext值;

3、showmessage(TMyMsg(message).Msgtext);
显示字符串:message 强制转换TMyMsg类型的Msgtext值;