N
netbug
Unregistered / Unconfirmed
GUEST, unregistred user!
我在查TMessage帮助时,发现:
type
TMessage = packed record
Msg: Cardinal;
case Integer of
0: (
WParam: Longint;
LParam: Longint;
Result: Longint);
1: (
WParamLo: Word;
WParamHi: Word;
LParamLo: Word;
LParamHi: Word;
ResultLo: Word;
ResultHi: Word);
end;
这里的TMessage记录是不是有两中:
TMessage = packed record
Msg: Cardinal;
WParam: Longint;
LParam: Longint;
Result: Longint;
end;
与TMessage = packed record
Msg: Cardinal;
WParamLo: Word;
WParamHi: Word;
LParamLo: Word;
LParamHi: Word;
ResultLo: Word;
ResultHi: Word;
end;这两种?
但我不知何时取第一个,何时取第二个?是不是与case Integer of有关?
我想请教一下:这里的Integer取0还是取1是与什么有关的?谢谢。
type
TMessage = packed record
Msg: Cardinal;
case Integer of
0: (
WParam: Longint;
LParam: Longint;
Result: Longint);
1: (
WParamLo: Word;
WParamHi: Word;
LParamLo: Word;
LParamHi: Word;
ResultLo: Word;
ResultHi: Word);
end;
这里的TMessage记录是不是有两中:
TMessage = packed record
Msg: Cardinal;
WParam: Longint;
LParam: Longint;
Result: Longint;
end;
与TMessage = packed record
Msg: Cardinal;
WParamLo: Word;
WParamHi: Word;
LParamLo: Word;
LParamHi: Word;
ResultLo: Word;
ResultHi: Word;
end;这两种?
但我不知何时取第一个,何时取第二个?是不是与case Integer of有关?
我想请教一下:这里的Integer取0还是取1是与什么有关的?谢谢。