[lazarus] TCanvas.Handle

Marc Weustink Marc.Weustink at cuperus.nl
Fri Nov 12 03:27:23 EST 1999


Hi, yesterday I had finally a mwCustomEditor showing itself on the lazarus
form. As far as you can see a gray control on a gray form ;-)
So I placed some text in the editor --> dump. It seems that it dumps on
canvasses not being there and TCanvas got into my focus.

At this moment TCanvas.Handle is (in GTK) a pointer to a fixed widget. For a
ControlCanvas this might be OK, but for a plain Canvas or a BitmapCanvas
this is not. Since  TCanvas.Handle is (in WIN32) a pointer to a DC and since
gdk has something like that (GC), if feel pretty much for TCanvas.Handle
(GTK) being a GC. This means that all the drawing stuff has to be changed.
But hey since most (win) API stuf has to be inmplemented yet in LCLWindows,
TCanvas.Rectangle(...) then calls DrawRect(Handle, ....).

Any major thoughts about this ?

Marc






More information about the Lazarus mailing list