Re: Messages...
From: David Reeve (dree4456_at_big-pond.net.au)
Date: 07/23/04
- Next message: David Reeve: "Re: Messages..."
- Previous message: Anton Feiertag: "Looking for contracting job in South Africa"
- In reply to:(deleted message) nobody_at_noplace.not: "Re: Messages..."
- Next in thread: Bruce Roberts: "Re: Messages..."
- Reply: Bruce Roberts: "Re: Messages..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Jul 2004 01:06:38 GMT
<nobody@noplace.not> wrote in message
news:go00g0h7ml49jdtkute8l4798tn48o39g9@4ax.com...
[snip]
> >So, eventually, DefWindowProc will get called.
>
> JEEEES... and I thought my standard dispatcher was complicated...
>
>
[snip.... more of Laura's love of API]
Delphi's message loop in TApplication.Run isn't that different to what you
have. What delphi does, and I like alot, is to provide a system for mapping
a chain of windows procedures to your object and it's ancestral line. 99% of
the time all you want to do is have your object respond to a user message of
your own making and swallow it. This really is made contract-free and
trivial using a message handler declared in the class def. If however, you
want to intercept an existing message, then you have the possibility of
subclassing by a simple override of TControl.Wndproc. You can dynamically
swap between windows procedures (why would you want to do that??) by simply
changing the TControl.WindowProc property. However, as far as intercepting
mouse clicks and the like for a custom component, it is even easier to
override the various click methods exposed by TControl.
Dave
- Next message: David Reeve: "Re: Messages..."
- Previous message: Anton Feiertag: "Looking for contracting job in South Africa"
- In reply to:(deleted message) nobody_at_noplace.not: "Re: Messages..."
- Next in thread: Bruce Roberts: "Re: Messages..."
- Reply: Bruce Roberts: "Re: Messages..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|