[lazarus] GTK team: please specify!
M.Nelissen at student.tue.nl
Sun Nov 2 13:20:40 EST 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?
This is determined at control creation time, there isn't a seperate
function for that. CreateWindow help:
WS_CLIPCHILDREN: Excludes the area occupied by child windows when
drawing occurs within the parent window. This style is used when
creating the parent window.
WS_CLIPSIBLINGS: Clips child windows relative to each other; that is,
when a particular child window receives a WM_PAINT message, the
WS_CLIPSIBLINGS style clips all other overlapping child windows out of
the region of the child window to be updated. If WS_CLIPSIBLINGS is not
specified and child windows overlap, it is possible, when drawing within
the client area of a child window, to draw within the client area of a
neighboring child window.
Where does that leave us?
OTOH, it is possible to create transparent window in the win32
interface. Is it too in gtk?
More information about the Lazarus