Type
TWMMouse=record
Msg:TMsgParam;
Keys:Word;
case Integer of
0:(Xpos:Integer;Ypos:Integer);
1:(Pos:TPoint;Result:LongPoint);
End;
上面那Case...end之间的意思是什么?
...全文
2027打赏收藏
没有人看得明白吗?这里的Record定义是什么意思?
Type TWMMouse=record Msg:TMsgParam; Keys:Word; case Integer of 0:(Xpos:Integer;Ypos:Integer); 1:(Pos:TPoint;Result:LongPoint); End; 上面那Case...end之间的意思是什么?
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的帮助
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的帮助