🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SetWindowsHookEx

#7436
From: Remy Lebeau (TeamB)
Date: Fri, 28 Jan 2005 18:54
19 lines
1807 bytes
"JD" <nospam@nospam.com> wrote in message
news:41f9fdbd$1@newsgroups.borland.com...

> I'm bewildered here because I've hooked into the application's
> main thread. It even catches changes in the state of forms that
> are not the main form (which is another issue for discussion)
> so why not when the message is sent to TApplication?

You are not taking into account that WH_CALLWNDPROCRET is only triggered
when SendMessage() is used to deliver a message directly to a window
procedure.  It is not triggered when PostMessage() is used to deliver a
message to the message queue instead of the window procedure directly.  For
that scenerio, you need a WH_GETMESSAGE hook as well.  The
TApplication::OnMessage event is only triggered when messages are retrieved
from the message queue.


Gambit
Technical Details
Message-ID: <41fa89dc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41f9fdbd$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5f60c991e080790d
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: <41f9fdbd$1@newsgroups.borland.com>
Subject: Re: SetWindowsHookEx
Date: Fri, 28 Jan 2005 10:54:58 -0800
Lines: 21
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: <41fa89dc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1106938332 68.69.17.41 (28 Jan 2005 10:52:12 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail