以下示範如何利用 LPARAM 傳遞指標 Ex1: 傳遞整數指標 發送端: var Num: integer; begin Num := 0; SendMessage(Form1.Handle, WM_USER+100, 1, LPARAM(@Num)); ShowMessage('Num = ' + IntToStr(Num)); end; 接收端: procedure TForm1.OnUserMsg(var Message: TMessage); var pi: ^integer; // pi 是一個指向整數的指標 begin if Message.WParam = 1 then begin pi := pointer(Message.LParam); pi^ := 100; end; end;