I've been testing this further and it seems to be the TCanvas code
that is causing the fault, not the mouse message itself. The following example
also causes a WinCE application to crash:
Procedure TForm1.FormPaint(Sender: TObject);
Begin
Canvas.Brush.Color := clBlue;
Canvas.Rectangle(Rect(50, 50, 150, 150));
End;
I am pretty sure this was working not that long ago. I will see if I can track
down the cause, but I must admit I'm still weak on understanding how LCL
hangs together!
Paul
On Friday 28 December 2007 07:44:36 Paul Michell wrote:
> Hello Everyone,
>
> I have just updated Lazarus to latest SVN (13497) and my WinCE application
> dies if I use a mouse move event. The following is a trivial example that
> displays the same bug. It works for Win32 but not on WinCE:
>
> Type Tform1 = Class(Tform)
> Procedure Formmousedown(Sender: Tobject; Button: Tmousebutton; Shift:
> Tshiftstate; X, Y: Integer);
> Procedure Formmousemove(Sender: Tobject; Shift: Tshiftstate; X, Y:
> Integer);
> Private
> { Private Declarations }
> Public
> { Public Declarations }
> OX, OY: Integer;
> Public
> End;
>
> Var
> Form1: Tform1;
>
> Implementation
>
> Procedure Tform1.Formmousedown(Sender: Tobject; Button: Tmousebutton;
> Shift: Tshiftstate; X, Y: Integer);
> Begin
> OX := X;
> OY := Y;
> End;
>
> Procedure Tform1.Formmousemove(Sender: Tobject; Shift: Tshiftstate; X, Y:
> Integer);
> Begin
> If ssLeft In Shift Then
> With Canvas Do
> Begin
> Pen.Color := clRed;
> Line(OX,OY,X,Y);
> OX := X;
> OY := Y;
> End;
> End;
>
> Am I missing something or is this a bug?
>
> Thanks,
>
> Paul Michell
>
> _________________________________________________________________
> To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives