🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Callback mechanics

#5953
From: Remy Lebeau (TeamB)
Date: Wed, 22 Jun 2005 06:23
29 lines
2106 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:k60hb19l3b2jr36alinqvjlqkqgsrecd3j@4ax.com...

> Your EnumProc is a subroutine of EnumWindows and belongs
> to the thread/process that called EnumWindows.

"Belongs" is not the best term to use.  The callback is merely called by
EnumWindows() when needed.  It does not "belong" to EnumWindows().  The
callback can be declared globally and used by multiple threads that are each
calling EnumWindows().

> Your DlgProc is a subroutine of DialogBox, and belongs to
> the thread/process that called DialogBox.

See above.

> Your MainWndProc is a subroutine of DispatchMessage,
> and belongs to the thread/process that calls it.

See above.  In the case of a window procedure, it is always called by the
thread that creates the window.  DispatchMessage() is not the only way that
a window procedure gets called.  SendMessage() can call a window procedure
directly.  If SendMessage() is called from a different thread, Windows
switches to the thread that owns the window and then that thread calls the
window procedure.


Gambit
Technical Details
Message-ID: <42b903e1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42b7fc1d$1@newsgroups.borland.com> <42b84cd0$1@newsgroups.borland.com> <k60hb19l3b2jr36alinqvjlqkqgsrecd3j@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bcabb6910c82b605
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: <42b7fc1d$1@newsgroups.borland.com> <42b84cd0$1@newsgroups.borland.com> <k60hb19l3b2jr36alinqvjlqkqgsrecd3j@4ax.com>
Subject: Re: Callback mechanics
Date: Tue, 21 Jun 2005 23:23:28 -0700
Lines: 31
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: <42b903e1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119421409 68.69.17.41 (21 Jun 2005 23:23:29 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail