[lazarus] Delphi and FPC compatible LCL version

Marc Weustink marc at dommelstein.net
Sat Nov 15 17:56:37 EST 2003

At 22:44 15-11-2003, Andreas Hausladen wrote:
>----- Original Message -----
>From: "Marc Weustink" <marc at dommelstein.net>
> > 1) When comparing pointers, they are unsigned
> >
> >   function ComparePointer(Data1, Data2: Pointer): integer;
> > [...]
> > Longint should have been a cardinal here
>Where have I used such a function? I cannot find it in my code.

unit AvgLvlTree, 4th chunk of you patch

Its in the beginning of your patch

> > 2) The handling of compiler directives
> > What if warnings were off ?
> >
> >       property Owner: TCustomListView read FOwner;
>You are right. But I have Warnings and Hints allways on, so I had not 
>notified this "error".

It's a "known" issue with these directives. One way to solve it is 
something like:

{$ifopt warnigns on}
{$define warnings_were_on}
{$warinings off}
do your things
{$ifdef warnings_were_on}
{$warinings on}
{$undef warnings_were_on}

That's a lot of ifdef.

> > We (thedevels) have had a litle discussion about it, and the final
> > conclusion is that the LCL won't support Delphi.
> > The LCL is written to be used with the FPC compiler and environment to
> > allow people to build Delphi-like code WITHOUT using Delphi.
>You know what this means for me. Now I have two opportunities: to fork or 
>to stop development on the Delphi port. For the first time
>I will choose the later...
>One last bug fix because it is not that easy to find.
>Function TWin32Object.IntSendMessage3(LM_Message: Integer; Sender: 
>TObject; Data: Pointer): Integer;
>   Procedure DrawOwnerButton;
>       ...
>       BitmapHandle:=TBitBtn(Sender).Glyph.Handle;
>       ...
>       DrawText(_HDC, LPSTR(TBitBtn(Sender).Caption),
>         -1, rcItem, TextPosFlags);
>**  DeleteObject(BitmapHandle);   <--- this line must be removed
>       DeleteDC(hdcBitmap);
>   end;

Eeek, thanx


More information about the Lazarus mailing list