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

Jeff Wormsley daworm at cdc.net
Tue Aug 10 16:04:22 EDT 1999


On 8/10/99, at 2:58 PM, Michael A. Hess wrote: 


>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.
>
<snip>
>
>Everything I talked about in the previous emails is how it is done.

Let's see if I have this right, then...  I know I am still in the air about callbacks...

TForm in its create calls SendMessage(LM_CREATE, Self)

TInteface processes the SendMessage, cases off of the message to LM_CREATE, then what???  I though it would create a window and set a variable of type HWnd, then somhow create/initialize a window procedure for that window handle.  I could create the window, but had no clue as to what to use for a window procedure.  According to the posts today, it would seem that is in TObject.

Somewhere there is this mysterious SetCallBack to handle.  If I read this right, when TInterface is told to set a callback, there is a method (of TObject?) that I can use that will update a list of messages and the handler address for the message, so that the objects WindowProc can then detect that type of message and call the appropriate handler.  Presumably all I need to do there is to translate the LM_xxx to the Win32 equivalent and away I go.  But, what if there is no equivalent?  Or it takes more than one Windows message to signal what other toolkits do in one?  Does TInterface need to maintain state information on every control it creates?

So, to summarize, the messages from the component are handled by TInterface casing the SendMessage, and messages from Windows are handled by callbacks, which are put in place by messages from TInterface and SendMessage.  Is this correct?

Jeff.







More information about the Lazarus mailing list