🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4257

Re: Continuing problem with SendMessage and WM_CCOPYDATA

#4257
From: Dennis Jones
Date: Mon, 27 Feb 2006 00:41
26 lines
2153 bytes
"Dennis Jones" <nospam@nospam.com> wrote in message
news:44024219$1@newsgroups.borland.com...
>
> Now, if you still want to send a message to the
> other instance, *maybe* (I don't know for sure -- I've never done it
myself)
> you need to send the message to the application's main window as opposed
to
> the main form...

Forget that -- it isn't necessary.  The main form handle is the one that
receives the message.  I just created a sample application, and it does
indeed receive the WM_COPYDATA message, and the SendMessage call does not
return until processing completes on the receiver.

Here's one thing you might not be aware of -- if you are doing this in the
IDE and trying to step through the code of the sending application, if you
have a design-time form/unit open in the IDE that matches the criteria of
the FindWindow call (your main form in this case), the design-time window
will receive the message instead of the other executing instance of your
application!  So, when you are testing from the IDE, close the design-time
main form and its associated CPP file.  Other than that, your current code
should work fine.

- Dennis
Technical Details
Message-ID: <44024ad1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <44021981$1@newsgroups.borland.com> <44024219$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6afbc9bf5041d787
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Dennis Jones" <nospam@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44021981$1@newsgroups.borland.com> <44024219$1@newsgroups.borland.com>
Subject: Re: Continuing problem with SendMessage and WM_CCOPYDATA
Date: Sun, 26 Feb 2006 16:41:55 -0800
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 204.200.27.7
Message-ID: <44024ad1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141000913 204.200.27.7 (26 Feb 2006 16:41:53 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail