Board index » delphi » How do I trap RegisteredWindowsMessages?

How do I trap RegisteredWindowsMessages?

I'm using RegisterWindowsMessage Win API call to pass simple events back
and forth between a suite of cooperating programs. In Borland Pascal 7 I
could over-ride DefWndProc in TWindow which would trap these messages.

Does anyone have any idea how I can do this in Delphi. Over-riding
the DefaultHandler method for the Form looks like it might be the route to
take but when I try this my application immediately generates the exception
EOutOfResources, even when the handler does nothing.

Any ideas would be most appreciated. I would ordinarly phone Borland support
with this one but they STILL haven't started their contract support line
for corporate customers in the UK!

Phil
--
Phil Jeffcock (p...@bradford.ac.uk)
Computer Centre, University of Bradford, Bradford, UK. +44.274.383317.

 

Re:How do I trap RegisteredWindowsMessages?


Quote
P.J.Jeffc...@bradford.ac.uk (Phil Jeffcock) wrote:
>I'm using RegisterWindowsMessage Win API call to pass simple events back
>and forth between a suite of cooperating programs. In Borland Pascal 7 I
>could over-ride DefWndProc in TWindow which would trap these messages.
>Does anyone have any idea how I can do this in Delphi. Over-riding
>the DefaultHandler method for the Form looks like it might be the route to
>take but when I try this my application immediately generates the exception
>EOutOfResources, even when the handler does nothing.
>Any ideas would be most appreciated. I would ordinarly phone Borland support
>with this one but they STILL haven't started their contract support line
>for corporate customers in the UK!
>Phil
>--
>Phil Jeffcock (p...@bradford.ac.uk)
>Computer Centre, University of Bradford, Bradford, UK. +44.274.383317.

Try searching help for "Message Handlers" here is an snippet:

type
  TMyControl = class(TWinControl)
    procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
  end;

Nope this helps.

------------------------------------------------
R. Jeffery Bogatay  (ru...@ic.net)  (74654,3321)

Other Threads