🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to use Msg given by RegisterWindowMessage ?

#12482
From: Remy Lebeau (TeamB)
Date: Mon, 08 Dec 2003 17:51
33 lines
1670 bytes
"Marc Gerin" <germar@skynet.be> wrote in message
news:3fd47dad$1@newsgroups.borland.com...

> Other application:
> I think one choice is a loop:
>     MSG msg;
> while (GetMessage((LPMSG)&msg,...)){
> if(msg.message=RegisterWindowMessage("essai"))
> {...}
> }

In your other application, you should override the form's WndProc() and
catch the message from there, ie:

    __fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
    {
        Mes = RegisterWindowMessage("essai");
    }

    void __fastcall TForm1::WndProc(TMessage &Message)
    {
        if( (Message.Msg == Mes) && (Mes != 0) )
        {
            //...
        }
        else
            TForm::WndProc(Message);
    }


Gambit
Technical Details
Message-ID: <3fd4b90b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fd47dad$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,eb1e7462132dca51
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-08 10:09:56 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fd47dad$1@newsgroups.borland.com>
Subject: Re: How to use Msg given by RegisterWindowMessage ?
Date: Mon, 8 Dec 2003 09:51:27 -0800
Lines: 35
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: 67.23.78.224
Message-ID: <3fd4b90b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070905611 67.23.78.224 (8 Dec 2003 09:46:51 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail