[lazarus] Delphi and FPC compatible LCL version

Marc Weustink marc at dommelstein.net
Sun Nov 16 11:55:03 EST 2003


At 22:44 15-11-2003, Andreas Hausladen wrote:

>One last bug fix because it is not that easy to find.
>
>interfaces/win32/win32object.inc:
>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;

Thanx, fixed.

There was possibly more wrong here. In the new DC, the bitmap wasn't 
deselected before destroying the DC.
It's not documented if this is allowed, but to be on the safe side, 
deselecting (== selecting the old object) does no harm.

Marc






More information about the Lazarus mailing list