๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Message to Application

#14232
From: Remy Lebeau (TeamB)
Date: Thu, 21 Aug 2003 20:41
33 lines
2107 bytes
"Eyyub Volkan ๏ฟฝektimur" <evcektimur@prokon.com.tr> wrote in message
news:3f452cce@newsgroups.borland.com...

> Is it possible to send message to application directly.

Sure, but only if the application in question has any windows upon which to
receive messages to begin with.

> I can propery send messages to windows but i couldn't send messages
> (my own messages that registered by RegisterWindowMessage ) to
> application.

Sure, you can.

> I handled application OnMessage Event but nothing happened !

The OnMessage event is only triggered for messges that are posted to the
message queue using PostMessage().  If you are using SendMessage(), then you
cannot use the OnMessage event, you need to intercept the message inside a
WndProc() instead.  If you are sending the message to a particular form,
then override that form's WndProc() method.  Otherwise, if you are sending
the message to the main TApplication window, then you will need to use
TApplication::HookMainWindow() instead.


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/03
Technical Details
Message-ID: <3f453adf$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f452cce@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,9c08a1118efca261
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-21 14:36:28 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f452cce@newsgroups.borland.com>
Subject: Re: Message to Application
Date: Thu, 21 Aug 2003 13:41:18 -0700
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.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f453adf$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1061501663 207.175.226.26 (21 Aug 2003 14:34:23 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail