L
let_it_be
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
const
cm_mymsg = wm_user+1;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure cmMyMsg(var msg: TMessage); message cm_mymsg;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
r: integer;
begin
r:=1;
sendmessage(handle, cm_mymsg, 0, r);
[red]showmessage(inttostr(r)); R 为什么 不等于 11, 还是 1。[/red]
end;
procedure TForm1.cmMyMsg(var msg: TMessage);
begin
msg.WParam:=11; [blue]这里改变[/blue]
msg.LParam:=11;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
const
cm_mymsg = wm_user+1;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure cmMyMsg(var msg: TMessage); message cm_mymsg;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
r: integer;
begin
r:=1;
sendmessage(handle, cm_mymsg, 0, r);
[red]showmessage(inttostr(r)); R 为什么 不等于 11, 还是 1。[/red]
end;
procedure TForm1.cmMyMsg(var msg: TMessage);
begin
msg.WParam:=11; [blue]这里改变[/blue]
msg.LParam:=11;
end;
end.