private
procedure SyncCall(var Msg: TMessage); message WM_USER;
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
SyncCall();//直接调用过程
//通过消息触发过程
SendMessage(Handle, WM_USER, Longint(stMessage), Longint(Data));
end;
procedure SyncCall();
begin
end;procedure TForm1.SyncCall(var Msg: TMessage);
begin
end;
以上两种方式有何区别??
1:直接调用过程
2:通过发送消息触发过程
在我的理解是:直接调用和发送消息因为没有用到多线程,都得在执行完了SyncCall函数后才能进行其它操作?
不知道这样理解是否正确?
procedure SyncCall(var Msg: TMessage); message WM_USER;
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
SyncCall();//直接调用过程
//通过消息触发过程
SendMessage(Handle, WM_USER, Longint(stMessage), Longint(Data));
end;
procedure SyncCall();
begin
end;procedure TForm1.SyncCall(var Msg: TMessage);
begin
end;
以上两种方式有何区别??
1:直接调用过程
2:通过发送消息触发过程
在我的理解是:直接调用和发送消息因为没有用到多线程,都得在执行完了SyncCall函数后才能进行其它操作?
不知道这样理解是否正确?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货