没有人看得明白吗?这里的Record定义是什么意思?

MAX·WOODS 2001-12-18 04:36:24
Type
TWMMouse=record
Msg:TMsgParam;
Keys:Word;
case Integer of
0:(Xpos:Integer;Ypos:Integer);
1:(Pos:TPoint;Result:LongPoint);
End;

上面那Case...end之间的意思是什么?
...全文
202 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
佛的光辉 2001-12-18
  • 打赏
  • 举报
回复
Type
TWMMouse=record
Msg:TMsgParam;
Keys:Word;
case Integer of
0:(Xpos:Integer;Ypos:Integer);
1:(Pos:TPoint;Result:LongPoint);
End;

应该是定义的是鼠标的系统消息记录,该记录是一个变体记录;msg表示系统消息的消息参数,
case Integer of
0:(Xpos:Integer;Ypos:Integer);
1:(Pos:TPoint;Result:LongPoint);
表示根据Msg的取值在记录中使用Xpos:Integer;Ypos:Integer还是pos:TPoint;Result:LongPoint
具体看delphi的帮助
佛的光辉 2001-12-18
  • 打赏
  • 举报
回复
Type
TWMMouse=record
Msg:TMsgParam;
Keys:Word;
case Integer of
0:(Xpos:Integer;Ypos:Integer);
1:(Pos:TPoint;Result:LongPoint);
End;

应该是定义的是鼠标的系统消息记录,该记录是一个变体记录;msg表示系统消息的消息参数,
case Integer of
0:(Xpos:Integer;Ypos:Integer);
1:(Pos:TPoint;Result:LongPoint);
表示根据Msg的取值在记录中使用Xpos:Integer;Ypos:Integer还是pos:TPoint;Result:LongPoint
具体看delphi的帮助
bluetooth_2001 2001-12-18
  • 打赏
  • 举报
回复
pos:TPoint,所以pos纪录屏幕像素显示的位置

Result???
王集鹄 2001-12-18
  • 打赏
  • 举报
回复
记录变体
jp311 2001-12-18
  • 打赏
  • 举报
回复
TO bluetooth_2001
POS,RESULT是什么意思呢???
知足常乐 2001-12-18
  • 打赏
  • 举报
回复
TWMMouse定义为record类型

用来记录鼠标消息
bluetooth_2001 2001-12-18
  • 打赏
  • 举报
回复
应该是鼠标的坐标

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧