🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: COPYDATASTRUCT problem

#4269
From: Remy Lebeau (TeamB)
Date: Mon, 27 Feb 2006 20:50
34 lines
2018 bytes
"Nate Lockwood" <RNLockwoodREMOVE@attglobal.net> wrote in message
news:4400e10b$1@newsgroups.borland.com...

> I send a message to a already running application from one that
> has just been started.  This works just fine AFAIK except when
> I try to get to the LParam.  Eventually I expect to retrieve a char
> string.

Your code is completely wrong for that.  You cannot use COPYDATASTRUCT with
any message other than the WM_COPYDATA message.  And you cannot use the
TApplication::OnMessage event to catch WM_COPYDATA messages, because the
OnMessage event is only triggered for messages that are posted to the
message queue, which WM_COPYDATA never is.

> I get this error:
>
> [C++ Error] Main.cpp(171): E2316 'WParam' is not a member of 'tagMSG'

WParam (capital letters) is a VCL naming convension.  tagMSG is a Win32 API
structure, not a VCL structure.  If you look at the definition of MSG in the
Win32 API, you will see the following:

    typedef struct tagMSG {
        HWND   hwnd;
        UINT   message;
        WPARAM wParam;
        LPARAM lParam;
        DWORD  time;
        POINT  pt;
    } MSG;


Gambit
Technical Details
Message-ID: <440365d0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4400e10b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,360125feb01249da
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4400e10b$1@newsgroups.borland.com>
Subject: Re: COPYDATASTRUCT problem
Date: Mon, 27 Feb 2006 12:50:07 -0800
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <440365d0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141073360 68.69.17.41 (27 Feb 2006 12:49:20 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail