[lazarus] GTK team: please specify!

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sun Nov 2 10:07:22 EST 2003

On Sun, 2 Nov 2003, Mattias Gaertner wrote:

> On Sun, 2 Nov 2003 15:03:10 +0100
> Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> > > The WinAPI specifies that GetDC(GetDesktopWindow()) should return a 
> > > device context of the screen. We can use this DC to draw on.
> > 
> > Very funny. ;)
> > What has the winapi to do with the gtk?
> > We need the window DC without clipping and we need an event to know, when
> > the gtk has finished painting everything. And during moving we have to
> > paint as well.
> > When we got this, we can omit the paint on every message and we can omit
> > the designer widgets, because the rest is already implemented. This
> > solution would be very near to my initial wish in a former mail.
> > I will do some experiments... 
> Ok. Maybe I found the solution.
> Now to the LCL.
> GetDC will just return the "normal" device context for a window. Under gtk
> this is without the child windows (they are clipped away). 
> The designer needs a DC with childs. Something like GetRawDC or GetWholeDC
> or GetDCForWholeWindow or GetDesignerDC or ... . I guess under win32api this
> is already the default, so you have little to do. If not, how does win32api
> calls it?

Maybe a stupid suggestion, but why don't you draw all that on the form
window/canvas ?  All widgets/controls must always be somewhere on the 
form. Also, if you move widgets over parent boundaries (which can happen)
the designer handles can still be drawn, since their coordinates are
relative to the form window, not relative to the parent.


More information about the Lazarus mailing list