Article View: borland.public.cppbuilder.nativeapi
Article #13059Re: Windows message question
From: Martin C
Date: Fri, 31 Oct 2003 22:15
Date: Fri, 31 Oct 2003 22:15
50 lines
2729 bytes
2729 bytes
Remy,
I think I am taking so much of your time today :) , Ok now I have messages
sent from my dll project to me exe more than fine, but I have a little
problem here...
Now when message is sent from my dll project to my exe project I use the
following function to receive the sent messages in my exe project...
void __fastcall TForm1::OnCopyData(TWMCopyData& Message)
{
char *ptr = reinterpret_cast<char*>(Message.CopyDataStruct->lpData);
AnsiString TheRecievedString(ptr, Message.CopyDataStruct->cbData);
AddMessageAndPlaySound(TheRecievedString); // Here I pass the received
message to another function to process the incoming message.
}
//--------------------------------------------------------------------------
-
My only problem here that the dll send these messages to my exe while
processing other functions, and once the dll message is received by the exe,
the dll project holds all its running operations until all the code under my
exe message event finish executing, so is it possible by anyway not to keep
the dll wait until all the code under my exe message event finish executing.
I appreciate your help and support
Best Regards
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:3f9eb458$1@newsgroups.borland.com...
>
> "Martin C" <martinc@aol.com> wrote in message
> news:3f9eaa27@newsgroups.borland.com...
>
> > This is really good solution, I can get the HWND of the exe once
> > its loaded, but can you give me more information on how to send
> > messages from the dll to the exe using the exe HWND.
>
> The same way you send any message - use PostMessage() or SendMessage(),
> depending on your needs.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<3fa2df07@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f9e672d@newsgroups.borland.com> <3f9ea71e$1@newsgroups.borland.com> <3f9eaa27@newsgroups.borland.com> <3f9eb458$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8012e723bc3abeb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-31 14:29:30 PST From: "Martin C" <martinc@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f9e672d@newsgroups.borland.com> <3f9ea71e$1@newsgroups.borland.com> <3f9eaa27@newsgroups.borland.com> <3f9eb458$1@newsgroups.borland.com> Subject: Re: Windows message question Date: Fri, 31 Oct 2003 14:15:37 -0800 Lines: 52 Organization: V Safe X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.10.4.238 Message-ID: <3fa2df07@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067638535 81.10.4.238 (31 Oct 2003 14:15:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail