Subj : Using Prf* routines in wi
To   : IAN MOOTE
From : MIKE RUSKAI
Date : Sat Jun 24 2000 08:35 am

Some senseless babbling from Ian Moote to Vitus Jensen
on 06-23-00  23:23 about Using Prf* routines in wi...

[snip]
VJ> "You should not spend a considerable amount of time inside the
VJ> window procedure.  Don't use APIs which may block (as the duration
VJ> of the block is not predictable in a multitasking system), don't
VJ> access files or devices (access may fail and have a long timeout),
VJ> and don't do lengthy operations (like filling a large listbox)."

IM> I've seen that kind of stuff mentioned before. And this is why all of
IM> those functions should be relegated to threads? So, really when you
IM> look  at it, in nearly all cases the window procedure is little more
IM> than a  thread dispatcher, which is why you want to try to keep it
IM> clear. Is  that about right?

Sort of.  The window procedure should do everything necessary to maintain
the window itself, short of long paints (which should be done on a separate
thread), and dispatch threads for the real work.  Ideally, that is.

One way of making that easier is to set up a second message queue, that
doesn't have a window associated with it, which receives all messages from
the main window procedure via WinPostMsg() that aren't to be done in that
main procedure.

Mike Ruskai
[email protected]


... HAL 9000: Help me, Dave. I can't run under Windows, Dave.

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr3
* Origin: Get all your fido mail here.. www.docsplace.org  (1:3603/140)