why it's doesn't work ???
constructor TRectThread.Create(NewDC : HDC; X, Y: Integer);
begin
DC:=NewDC;
XLocation:=X;
YLocation:=Y;
FreeOnTerminate := True;
bmp:=TBitMap.Create;
bmp.Width:=40;
bmp.Height:=40;
inherited Create(True);
end;
procedure TRectThread.Execute;
begin
DrawPoint;
end;
procedure TRectThread.Start;
Begin
Resume;
End;
procedure TRectThread.Stop;
Begin
if not Suspended Then
Begin
Suspend;
End;
End;
procedure TRectThread.DrawPoint;
begin
While Not(Terminated) Do
begin
Begin
begin
bmp.Canvas.Handle:=DC;
bmp.Canvas.Rectangle(10,10,100,100);
end;
End;
sleep(100);
end;
end;
how can i draw over the dc ?
thanks...
constructor TRectThread.Create(NewDC : HDC; X, Y: Integer);
begin
DC:=NewDC;
XLocation:=X;
YLocation:=Y;
FreeOnTerminate := True;
bmp:=TBitMap.Create;
bmp.Width:=40;
bmp.Height:=40;
inherited Create(True);
end;
procedure TRectThread.Execute;
begin
DrawPoint;
end;
procedure TRectThread.Start;
Begin
Resume;
End;
procedure TRectThread.Stop;
Begin
if not Suspended Then
Begin
Suspend;
End;
End;
procedure TRectThread.DrawPoint;
begin
While Not(Terminated) Do
begin
Begin
begin
bmp.Canvas.Handle:=DC;
bmp.Canvas.Rectangle(10,10,100,100);
end;
End;
sleep(100);
end;
end;
how can i draw over the dc ?
thanks...