BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Returning Windows Messages

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Nov 16, 2006 9:38 pm    Post subject: Returning Windows Messages Reply with quote



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





PostPosted: Wed Nov 22, 2006 9:13 am    Post subject: Re: Returning Windows Messages Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.