[lazarus] Some (major) changes

Marc Weustink weus at quicknet.nl
Sun Nov 14 18:55:07 EST 1999


At 18:15 14-11-99 -0500, Michael A. Hess wrote:
>Marc Weustink wrote:
>> 
>> If you look in another way, what's the diference between
>> InterfaceObject.Sendmessage(LM_DrawRect...) and
>
>Actually I would hope you are not doing it this way. You should just be
>calling:
>
>SendMessage(LM_DrawRect...);

I think LM_DrawRect will be gone soon ( but thas something different ;-)

>The SendMessage routine is located in the controls.pp file. It isn't a
>part of TControl it is just located in this file since 95% of the time
>all components needs to use the controls unit. If you are calling
>InterfaceObject.whatever then that means your file must know about the
>Interface unit. The only unit that SHOULD know about and call it is the
>controls unit unless there is some overwhelming reason you must call
>interfaceobject yourself. This should be avoided.

I know, I know, it was just an example to so the similarity between the way
I implemented Rectangle and the way SendMessage is implemented.
I somewhere wrote this in my original message.

>> InterfaceObject.Rectangle(...) ?
>
>You wouldn't want to do this for the above reason. It would be better to
>create a Rectangle routine in controls.pp that called the interface
>unit. 

For now I placed the includes in the LCLLinux, since there were already
some API funcs

>If we can keep all calls to the underlying GUI API going through
>just one place we can more easily adapt the LCL to other APIs.

Oops that was what I ment to say, was it that unclear ?

The only thing I wanted to say that all stays the same, except that instead
of encoding your params in a struct, send them through a sendmessage and
decoding them, you can call this function directly (like SendMessage)

Marc






More information about the Lazarus mailing list