2006-11-16 15:38:51 UTC
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),
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);
// Only want to return result if
Msg.Result := 1;
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...