J
Jhdandcl
Unregistered / Unconfirmed
GUEST, unregistred user!
有2个记录:
Type
TWMCommand = packed record
Msg: Cardinal;
ItemID: Word;
NotifyCode: Word;
Ctl: HWND;
Result: Longint;
end;
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;
var
tm : TWMcommand;
tm1: TMessage
..........
tm. Msg := ...
tm. ItemID:= ...
tm.NotifyCode := ...
tm. Ctl:=
tm. Result:= ..
showmessage(inttostr( Tmessage(tm).wpram ))
...... 为什么正确 ?
请详细说名记录类型强制转换的条件》
Type
TWMCommand = packed record
Msg: Cardinal;
ItemID: Word;
NotifyCode: Word;
Ctl: HWND;
Result: Longint;
end;
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;
var
tm : TWMcommand;
tm1: TMessage
..........
tm. Msg := ...
tm. ItemID:= ...
tm.NotifyCode := ...
tm. Ctl:=
tm. Result:= ..
showmessage(inttostr( Tmessage(tm).wpram ))
...... 为什么正确 ?
请详细说名记录类型强制转换的条件》