 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Nov 16, 2006 9:38 pm Post subject: Returning Windows Messages |
|
|
I have two applications that I want to talk to each othe
Application 1 uses the following code to send some information to
Application 2 and lock up until it gets an appropriate reply:
MF.Enabled := False; // Deactivate the main form
sent := SendMessage(rh, WM_COPYDATA, Integer(Handle),
Integer(@copyDataStruct));
if sent > 0 then // reactivate the main form when
edits are over
Application 2 catches the message using the following code:
procedure TEditProjectDetails.WMCopyData(var msg: TWMCopyData);
begin
HandleReceivedMessage(Msg.CopyDataStruct);
// Only want to return result if
Msg.Result := 1;
end;
The HandleReceivedMessage procedure uses the received information to
seed a form which is then edited and saved.
Whilst I can seed the form what I cannot figure out is how to wait
until the data is saved to send the Msg.Result back to Application 1.
Copying Msg into a global variable seems not to work when I assign to
Msg.Result at a later point... |
|
| Back to top |
|
 |
Riki Wiki Guest
|
Posted: Wed Nov 22, 2006 9:13 am Post subject: Re: Returning Windows Messages |
|
|
Hoi
You need to repost your question in newsgroup b.p.d.nativeapi.win32 because
this newsgroup do not officially exist.
How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups> |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|