[lazarus] More Native Win32 stuff(Pascal,canyouhelphere?)

Michael A. Hess mhess at miraclec.com
Tue Aug 10 14:43:43 EDT 1999


Jeff Wormsley wrote:
> 
> On 8/10/99, at 2:21 PM, Michael A. Hess wrote:
> 
> >Which way are you talking about the message being sent? Are you
> >talking about the message coming from Windows back to the LCL code to
> >a message handler or are you sending a message to Windows?
> 
> I was focusing first on the handling the LM_xxx messages generated by
> the LCL, not from windows itself.

That is what I was afraid you were going to say. That has been the whole
confusion. We are not talking about the same thing. Shane and I are
refering to the callbacks from Windows and how these messages get
translated to the objects. That is what the messaging and Dispatch we
are talking about is used for.

> All I was looking to do first was just LM_CREATE and LM_DESTROY to
> create and destroy a form, and ignore everything else.  But I couldn't
> get past LM_CREATE, because as I thought there was not enough info to
> create what I needed.  If I am reading the rest of the message right,
> I just didn't get deep enough into the tree to find what I needed. 

No, that isn't correct because we are talking about different things.
However this still is confusing to me because I don't understand your
problem. In the LCL a control sends the following to the win32int unit.

SendMessage(LM_CREATE, Self, nil);

Do not confuse this with any kind of messaging used in Windows or X.
This is simply an internal thing between the LCL and the xxxint.pp unit
in question. It is calling the InterfaceObject.IntSendMessage method.

It is inside this method that you need to determine which message was
sent, in this case LM_CREATE, what type of component is sending it, you
check the controlstyle for this, and then from that you will call the
appropriate Windows API routines to actually create the control.

Then you will attach any required callbacks to this Windows control so
that they also come back through the win32int unit to be sent to the
correct control via the Dispatch routine.

Everything you need should already be available in the TControl that is
being passed in the SendMessage as Self.

Does this make any sense now?

> I will be interested to see how a message from Windows is handled,
> though.

Everything I talked about in the previous emails is how it is done.

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list