🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sending a character string as a message ?

#4551
From: Vladimir Stefanovic
Date: Sun, 08 Jan 2006 14:04
32 lines
1870 bytes
> This may sound like a dumb question but is it possible to send
> a string of characters from one app to another using the
> windows API ?? Currently I am using files to do this but a more
> direct way would be better.

A character is only 1 byte so it fits in SendMessage() 3rd argument
for sending.

Look here:
http://tinyurl.com/9ruwh

... and find the part that Gambit (Remy Lebeau) has presented:

    #define MY_CUSTOM_MESSAGE (WM_APP + 100)


    SendMessage(pReceiveAppHandle, MY_CUSTOM_MESSAGE, YourChar, 0);


    void __fastcall TForm1::WndProc(TMessage &Message)
    {
        if( Message.Msg == MY_CUSTOM_MESSAGE )
            ShowMessage("Character arrived: " +
AnsiString((char)Message.WParam));
        else
            TForm::WndProc(Message);
    }


-- 
Best regards,
Vladimir Stefanovic 
Technical Details
Message-ID: <43c11b4c$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!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <43c115e7@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f0b09784cee63bed
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43c115e7@newsgroups.borland.com>
Subject: Re: Sending a character string as a message ?
Date: Sun, 8 Jan 2006 15:04:06 +0100
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 82.117.212.65
Message-ID: <43c11b4c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1136728908 82.117.212.65 (8 Jan 2006 06:01:48 -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!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail