Luke Pascoe asked:
> How do you send/post a message to a component that doesn't have a handle
> (Like a TGraphicControl)? BTW, The component will be sending the
> message to itself, but it needs to go via the message queue so
> DispatchMessage is no good.
The way that our code does this at profax is to use the same technique that
Delphi does to have a handleless control dispatch a message. And example of
of the way that I do event redirection from a handled control to a gadget is
as follows:
procedure TnCustomDropDown.WMPaste(var Message: TMessage);
begin
Gadget.WindowProc(Message)
end;
which basically takes in incoming message for redirected it into the
WindowProc of the gadget. This trick relies on the TControl WindowProc doing
appropiate dispatching via Delphi's dynamic method handling.
I'd recommend Controls.pas as required reading from anyone doing serious
Delphi programming, as holds much valuable information about Delphi
programming disguised as ordinary source code 8-)
Cheers, Max.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"